Force rerender of entire component on prop change
I have a component that takes some data that is derived by keying into a large data object and the key is from useParams.
When this data is passed into the component, some derived signals are created etc .. and I think some not neceassarily reactive objects are created. But I think details dont matter much, I can often work around with some effects to reset certain things on prop changes.
But in cases like these, just wondering if there is a way to instruct a rerender of that branch, I tried using dynamic but since it still renders the same component with different props it maintains whatever was there.
Only solution I found was to create 3 distinct components with the props prepared and using that in dynamic, which works but is inconvenient.
I could probably redesign this in particular to just work better with the reactive system but also out of curiosity wondering if this would be possible, something like trigger "rerender" of some part maybe based on some key.
Thanks
2 Replies