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

Tweak example conventions #473

Merged
merged 1 commit into from
Aug 12, 2015
Merged

Conversation

gaearon
Copy link
Contributor

@gaearon gaearon commented Aug 12, 2015

So... this is fairly opinionated but I think we need to do this.
Changes:

  • Root component is the one that includes Provider, and in more complex cases, Router. We make it clear it's needed because that's what keeps hot reloading working until we fix Find a way to cut getReducer and replaceReducer from the API #350.
  • Make it clear it's fine to put constants together with actions if you have a tiny project. You'll recognize if it gets out of hand anyway.
  • Make it a convention to have configureStore() method for easier testing (I'm just renaming it here).
  • Bye bye, relying on import * for reducers. This is one of the most commonly asked questions. Now we'll recommend having reducers/index.js with combineReducers call so you can more clearly trace where the names are coming from.

Umm, that's about it. Everybody on board?

@gaearon
Copy link
Contributor Author

gaearon commented Aug 12, 2015

I'm impatient so I'll just merge it. Feel free to argue afterwards :-)

gaearon added a commit that referenced this pull request Aug 12, 2015
@gaearon gaearon merged commit f179ba8 into breaking-changes-1.0 Aug 12, 2015
@gaearon gaearon deleted the tweak-example-conventions branch August 12, 2015 23:49
@ghengeveld
Copy link
Contributor

Don't forget to update the Arguments section in the combineReducers API docs. It still suggests using import *. So does the example.

@gaearon
Copy link
Contributor Author

gaearon commented Aug 18, 2015

@ghengeveld Would you like to make a PR?

@ghengeveld
Copy link
Contributor

Done: #590

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

Successfully merging this pull request may close these issues.

2 participants