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
Check out https://github.com/philipp-spiess/use-store. It's not using useReducer to set up the store (maybe we can manage to add support for that?) but you can use your existing Redux-like store with ease and interact with the store outside of React as well.
@philipp-spiess looks great! I was coming at it more from the perspective of a non-redux user, and thinking about it in super simple terms. i.e. combining useContext and useReducer to offer a way to store and update a complex, app-global object.
Using
useReducer
to create a global state object, store in Context and accessed withuseContext
:https://gist.github.com/thchia/dd1bc8200fd8cff89cfa6c928983e5c4
The text was updated successfully, but these errors were encountered: