Giter Club home page Giter Club logo

Comments (3)

chrisvxd avatar chrisvxd commented on August 31, 2024

Hi @joaojoyce! Thanks for your report, but unfortunately I'm unable to reproduce. I tried copying your code snippet above into the demo application and the resolver ran fine.

If you can share a repo or codepen which reproduces the issue, I can investigate further.

from puck.

joaojoyce avatar joaojoyce commented on August 31, 2024

Hi @chrisvxd ,

I found out that resolveData doesn't work if I pass properties to <Puck />. I also get the warning that passing properties to <Puck /> is deprecated.

So this does work:

<Puck config={config} />

This doesn't

<Puck 
          overrides={{headerActions:()=>(...)}}
          onChange={(data) => {onChange({ target: {  name, value: JSON.stringify(data)}})}} 
          data={initialData} config={config}  >
</Puck>

Is this intended? It's very convenient and intuitive to pass these properties to puck directly. Also, this makes it easy to abstract generic configs that would work the same on <Puck /> and on <Render />.

For instance, the onChange and overrides that I have here aren't needed on my frontend where I render...

from puck.

joaojoyce avatar joaojoyce commented on August 31, 2024

Nevermind. It was my initialData that was not built correctly.

from puck.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.