-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Use context to pass down redux and use decorators on smart components #245
Comments
I agree that the API is a little awkward as is. Evaluating only the API itself, this looks fantastic. |
The current API is designed to encourage best React practices by forcing you to pass action creators down as props. Read Dan's article about "Smart and Dumb Components" https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0 Your CounterApp is a smart component. Following best practices, you should pass down |
I'm not too fond of the current |
@acdlite This is not meant to be a demo of "best practices", only a demo of a slightly different API for redux. My goals are to remove the need for |
@cgarvis If I'm not mistaken, you're proposing a new API to replace the current once. I'm telling you why this particular proposal isn't likely to be accepted :) Let's move further discussion over to this thread reduxjs/react-redux#1 |
Love the ideas with redux. I haven't been able to dig into the actually code, but the API was bothering me a little so I've been play with some ideas. Think
context
and ES7 Decorators make for a better interface. Here are some code snippets demonstrating it.Smart component would look like:
Redux mixin would look like:
Redux Component and loading CounterApp
The text was updated successfully, but these errors were encountered: