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

Can this pattern be used for large data? #39

Closed
varghesep opened this issue Jun 23, 2017 · 2 comments
Closed

Can this pattern be used for large data? #39

varghesep opened this issue Jun 23, 2017 · 2 comments

Comments

@varghesep
Copy link

varghesep commented Jun 23, 2017

In my opinion, synching the store and the local storage will work for small ToDo app where the state is very minimum. But for a real application like a catalog management, you have thousands of products. You can't bring-in all those products to the store. The local storage can have all the products, but the store can have only the products which have been searched by the user.

What is your opinion on this?

@ferdis
Copy link

ferdis commented Jun 26, 2017

It's a state store. You're going to have a bad time trying to use redux as a document store, IMO. I think the examples use it as such as a matter of convenience.

Ideally one would use paginated responses from an endpoint, and update the state with that metadata. Saving all the records in the store(or simply in the browser) may quickly cause the app to become unresponsive while retrieving and modifying them.

I tend to use the state store as a pointer to locate the data that needs to be shown, for large datasets like product inventories, etc. You could store your current result set in a simplified state(id + name) for preloading, and even the current record if being modified, though.

@btroncone
Copy link
Owner

@varghesep You can also pick and choose which slices of state you wish to sync. Maybe you have a large store but only need a small section to by synced with local storage, this library will aid you in this regard. 👍

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

3 participants