Comments (3)
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.
from solid.
Got same problem 🤔
from solid.
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.
from solid.
Related Issues (10)
- useStore build error: Argument of type 'WritableAtom<number>' is not assignable to parameter of type 'Store<any>'. HOT 5
- Creating Computed Stores with Arguments
- Upgrade nanostore@"^0.7.0" peer dependency to nanostores@"^0.8.0" HOT 1
- `useStore()` Value Incorrectly Rendered in Astro SPA Mode HOT 1
- `useStore()` shows incorrect initial value with '@nanostores/persistent'
- Move to npm org HOT 5
- Rename GitHub repo HOT 2
- useStore<T extends StoreNode>(store: ReadableAtom<T>) type error
- Should there be a version of useStore & useSignal which return a [accessor, setter] pair? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solid.