Skip to content

Add a "Code Splitting" docs page. #3186

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
markerikson opened this issue Oct 20, 2018 · 6 comments
Closed

Add a "Code Splitting" docs page. #3186

markerikson opened this issue Oct 20, 2018 · 6 comments
Labels

Comments

@markerikson
Copy link
Contributor

I would like a new docs page added that describes how to code-split Redux reducers (and possibly other pieces of Redux-related code as well). We'd add it under the "Recipes" section for now, but move it under the future "Real-World Apps" section described in the docs revamp in #2590 when we get that section up.

This page should explain the general principles and technique for code-splitting reducers (re-running combineReducers with the new slice reducers, etc). It should also point to 2-3 of the best-looking existing userland libraries for handling this more automatically, such as https://redux-dynamic-modules.js.org and https://github.com/ioof-holdings/redux-dynamic-reducer .

For reference on this topic, I have links to a few existing articles on code-splitting reducers in the Redux Reducers page in my links list, and a bunch of links to existing libraries in the Reducers#Dynamic Reducer Injection section of my addons list.

Please comment here if you're interested in writing this page!

@abettadapur
Copy link
Contributor

I can help in writing this page. I can get started over this weekend

@markerikson
Copy link
Contributor Author

Cool, thanks!

@JustFly1984
Copy link

Hello everyone! I think my question could be related:

  • How could you split reducers based on immutable.js Map as root?

I have pretty much 4 separate redux stores:

  • static
  • account
  • manager
  • admin

account and manager reducers are growing intensively, so I would like to separate some parts to reduce bundle size

@markerikson
Copy link
Contributor Author

@JustFly1984 : there shouldn't be any difference in how you split a state tree with a plain JS object root and an Immutable.js Map root, other than needing to use a specialized version of combineReducers() to generate the root reducer.

@abettadapur
Copy link
Contributor

abettadapur commented Oct 21, 2018

Started work here

@markerikson
Copy link
Contributor Author

Merged in #3190 .

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

3 participants