Skip to content
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

lazy load certain state #66

Closed
pke opened this issue Mar 4, 2016 · 4 comments
Closed

lazy load certain state #66

pke opened this issue Mar 4, 2016 · 4 comments
Labels

Comments

@pke
Copy link

pke commented Mar 4, 2016

I have some arrays in my state that I don't need at app start right away. I'd rather load them when I first need to display them. Does redux-persist support that?

@rt2zz
Copy link
Owner

rt2zz commented Apr 4, 2016

It does not currently, but it could be added. the REHYDRATE action has no requirement to be complete, so we can potentially split the restoration process into 2+ actions. Do you have any api's in mind?

The one thing to consider is that we cannot start persisting until all state has been rehydrated, otherwise we risk overwriting the yet loaded state.

@aguynamedben
Copy link
Collaborator

This hasn't been responded to in a long while, so I'm going to mark it as stale. Please feel free to continue the conversation and I'll reopen.

@nishanBende
Copy link

@aguynamedben @pke @rt2zz I didn't know this issue existed, so I created a new one. I thought of an API in which we can have multiple PersistGate with a prop of which state to restore and delay rendering of that specific UI that needs that state.
#1094

@nishanBende
Copy link

Sometimes I hesitate to use this awesome library just because of this issue.

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

No branches or pull requests

4 participants