API to update config object #675
Closed
mauri-bask-health
started this conversation in
Ideas
Replies: 1 comment
-
Hey @mauri-bask-health - thank you and sorry for the delayed response. I've not been active in checking discussions - most chatter happens via our Discord (link in README). Correct - Puck doesn't currently react to I've opened a ticket here! #689 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! First of all, let me thank you for the amazing work you’re doing with Puck!
I am currently exploring the feasibility of implementing Puck in a feature/module we plan to develop soon at my company.
I encountered an issue while trying to enable a specific, highly important use case for us:
Hero
component in the demo).Our goal is for this feature to support live editing and component creation. I’ve made progress by enabling the creation of these “component instances” and attaching the render function from the base component.
However, the issue arises when updating the
config (Component Configuration)
object. I cannot simply share an updated version of the object (usinguseState
), nor is there an API available for this, as there is for the data object, for example.So, I’d like to know if it is feasible to create an action specifically for this use case (updating the
config
object).Currently, the workaround I found (though not ideal) is to reload the entire page. This way, the new config object is fetched from the initial rendering, and everything works as expected.
P.S.: I even tried adding a specific key that would, in theory, trigger a re-render of the component, but it didn’t work. I also tried using a different flag with a timeout to delay rendering until the new config object was available, but it seems to be cached or something similar within .
I hope this was clear enough! If not, please let me know, and I’ll try to provide a clearer explanation with an example.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions