-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client side re-rendering of components #1077
Comments
This is interesting. Just to understand a bit more, can you give me an example of your scenario when you need properties to dynamically change and then re-rendering of nested components? I think the original scenario in #295 was about a SSR header that would have some breadcrumbs, and the idea was to change them depending on some Client-side actions. Is it something similar? |
So let's say we have a breadcrumbs open component and to render it I would give it a list of URLs and page names. It's worth noting that events can be annoying if you have 2 times the same component in the same page that should have different values. |
Any thoughts on that @matteofigus ? 🙂 |
@matteofigus Should I make a draft of that feature? |
Sure! |
We need some query parameters on the server side to do some checks, validate some params, etc... but in modern applications nowadays client-side rendering/re-rendering is common practice.
At the moment, if we want a property to dynamically change, we:
It would be good if this system would be built in.
One problem with the params is that we would need to differentiate between params that would be Client side params and others that would be Server side ones.
Coming from a mainly React background, triggering re-rendering based on new props/attributes seem a pretty good way to go.
We could allow setting data-attributes on the OC HTML element. The templates could set a Mutation Observer on that HTML element and then pass it down to e.g. the react template to pass the new "settings" which would automatically trigger the Client side re-rendering.
This implementation might have to be done on a template to template basis.
This feature might be related to this one: issue 295
Any thoughts on this?
If this is not clear, I am more than happy to create an example repo.
The text was updated successfully, but these errors were encountered: