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
In SSR environments such as Astro + Solid, pre-rendered content does not re-render to show updated content from persistent storage engines.
I understand that this package only claims to be an integration for Nano Stores and not Nano Stores Persistent but I will still open this issue just in case.
UPDATE: I have found a working fix that roughly involves moving the code that sets the atom value based on localStorage from the onMount function of Nano Stores to the onMount function of Solid instead. However, these modifications require changes to the framework-agnostic @nanostores/persistent package just to fix a highly-specific issue involving Solid SSR environments, which is why I have not opened a PR to upstream them.
Instead, in the meantime before a more appropriate fix is applied which can retain the agnostic nature of @nanostores/persistent, I have published a library (and corresponding NPM package) that serves as a drop-in replacement for both @nanostores/persistent and @nanostores/solid which adds this use-case of persistent atoms/maps to Solid SSR environments.
It tooks ages to final see your solution @vxncetxn and I'm so thankful you shared it.
Have you moved to a different fix since? Just asking because i see the last update was a while to the NPM package.
Describe the bug
In SSR environments such as Astro + Solid, pre-rendered content does not re-render to show updated content from persistent storage engines.
I understand that this package only claims to be an integration for Nano Stores and not Nano Stores Persistent but I will still open this issue just in case.
Your Example Website or App
Minimal reproduction
Steps to Reproduce the Bug or Issue
The text was updated successfully, but these errors were encountered: