saasquatch / bunshi

Molecule pattern for jotai, valtio, zustand, nanostores, xstate, react and vue
https://www.bunshi.org/
MIT License
230 stars 17 forks source link

Feature request - read / write molecules #13

Closed matthew-dean closed 1 year ago

matthew-dean commented 1 year ago

One thing I was hoping to do is replace a custom implementation of Jotai that leverages unstable_createStore to read / write atoms in utility functions (outside a React context).

Jotai-molecules seems to get 99% of the way there in terms of defining global context, but stops short of updating atoms outside of components.

It would be great if this package would allow setting atoms / molecules outside of React (having read/write molecules).

loganvolkers commented 1 year ago

Hey @matthew-dean thanks for the feedback.

I believe that the newest versions of jotai have what you're looking for.

Sorry for the slow response, and please re-open this issue if there's anything else we can help with.