Skip to content

How initialize the Slices Pattern store ? #2445

Discussion options

You must be logged in to vote

@jefersonjuliani what you are trying to do is not possible using create since that returns a react function (hook) may is possible using createStore but you need to keep in mind that functions are not serializable. I would just create the initial state without actions and then use that to create an store using createStore but then if you want to use that store you have to use context api in order to make that store available in the tree

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jefersonjuliani
Comment options

@dbritto-dev
Comment options

Answer selected by jefersonjuliani
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants