Code Monkey home page Code Monkey logo

Comments (7)

woellij avatar woellij commented on June 29, 2024 1

Thanks, I will check it out

from builder.

woellij avatar woellij commented on June 29, 2024

Hi. Just following up. We'd like to use the GEN2 SDKs but there is no way to update the BuilderStoreContext with a new state. Could you enlighten us please?

from builder.

mrkoreye avatar mrkoreye commented on June 29, 2024

Hi @woellij , can you describe what you are trying to achieve in more detail so that we can help? As in, what is the end goal you have? Are you trying to pass functions to be used within Builder content? Set an initial state for Builder content?

from builder.

woellij avatar woellij commented on June 29, 2024

Hi @mrkoreye ,
The Goal is to Update the state from a custom component.
Im our case there is a custom component in which the User can select a product which should cause an update to the state, so text on the page can bind to the product's properties.
We have other uses for the state and context (passing state and context props to child components)

from builder.

samijaber avatar samijaber commented on June 29, 2024

@woellij Thanks for reporting. The context exists but is not currently being exported by the Gen2 SDKs.

I will let you know here when it is fixed.

from builder.

samijaber avatar samijaber commented on June 29, 2024

@woellij v1.0.19 now exports BuilderContext:

https://github.com/BuilderIO/builder/blob/main/packages/sdks/output/react/CHANGELOG.md#1019

from builder.

woellij avatar woellij commented on June 29, 2024

Hi.
I had a look and while i can reference the BuilderContext in useContext, there is no real typescript type information and one would have to resort to the builder.io sourcecode to find out about BuilderContextInterface.
In my opinion that's not really optimal.

Also, the text does not update when the rootState is updated with rootSetState. Is there a way to accomplish that from a custom Component? If the state is set through an Action configured in builder.io the text updates.

from builder.

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.