Skip to content

[Question] Initialize State Asynchronously #1368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hnordt opened this issue Feb 5, 2016 · 2 comments
Closed

[Question] Initialize State Asynchronously #1368

hnordt opened this issue Feb 5, 2016 · 2 comments

Comments

@hnordt
Copy link

hnordt commented Feb 5, 2016

I'm wondering how to initialize state asynchronously.

Something like:

myAsyncStorage.getItem('state').then(initialState => createStore(rootReducer, initialState))

Any ideas?

@gaearon
Copy link
Contributor

gaearon commented Feb 5, 2016

Either don’t create a store yet or do that via a special action. See discussion in #658 for an example.

@gaearon gaearon closed this as completed Feb 5, 2016
@hnordt
Copy link
Author

hnordt commented Feb 5, 2016

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants