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

Feature for tracking the parts of state that are actually needed by a component, instead of adding them manually. #1629

Closed
lopeselio opened this issue Sep 7, 2020 · 3 comments

Comments

@lopeselio
Copy link

New Features

connect and useSelector programming interfaces usually depend on the user manually specifying which state would need to be extracted in order to be rendered

What is the new or updated feature that you are suggesting?

Would be helpful and easy if there is a feature for tracking the parts of state that are actually needed by a component

Why should this feature be included?

So that added components do not increase the bundle size

What docs changes are needed to explain this?

@timdorr
Copy link
Member

timdorr commented Sep 7, 2020

This isn't how Redux works. It only takes a single reducer at its root, so state cannot be broken up into smaller bits.

If you want to lazy load parts of your app to reduce chunk sizes in your bundle, you are certainly free to do that. But it's not something Redux can help you with.

@timdorr timdorr closed this as completed Sep 7, 2020
@markerikson
Copy link
Contributor

Also, frankly it's really not clear what you're asking for here, either.

@dai-shi
Copy link
Contributor

dai-shi commented Sep 7, 2020

Not sure, but is it something like #1503?

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

4 participants