SolidJSS
SolidJSโ€ข14mo agoโ€ข
6 replies
Bravi

How to prevent re-creation of a component inside <For>?

Hi everyone. To illustrate my issue, I created a very minimal version of the application that I have. To see the problem I am facing, just click on any of the links in the rendered page and then click on the button that appears. You will notice that the button will disappear (because the component gets re-created and the state is reset). What would be the best approach to prevent this from happening?
https://codesandbox.io/p/devbox/r5k78c
Was this page helpful?