You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I don't know why I just realized this now, I thought it was normal but out of React, Svelte, Vue, and Solid.
Only Svelte and Soliddon't persist state between HMR updates.
Describe the bug
So I don't know why I just realized this now, I thought it was normal but out of React, Svelte, Vue, and Solid.
Only Svelte and Solid don't persist state between HMR updates.
Is it because Solid and Svelte have a "compiler"?
Edit: Interestingly I found something on why Svelte disables it and how to re-enable it: https://stackoverflow.com/questions/78013735/how-do-i-preserve-state-when-hot-reloading-in-a-standard-sveltekit-dev-environme. It's good that it's at least documented, but not sure for SolidJS.
Your Example Website or App
https://github.com/blankeos/solid-hmr-signal-bugs
Steps to Reproduce the Bug or Issue
To reproduce:
cd <project>bun installthenbun devthen open http://localhost:3000/Expected behavior
State is persisted (kinda useful when styling modals currently opened, making changes the component is in a specific state, etc.)
Screenshots or Videos
solid-signal-persist-hmr.mp4
Platform
Additional context
No response