RFC - Remove all current binding functions except for Hooks
See original GitHub issueI’m thinking about a bold breaking change.
After this awesome PR by @d3x7r0, you can use Redux Zero with a really small API, based on Hooks:
const Counter = () => {
const store = useStore();
const count = useSelector(({ count }) => count);
const increment = useAction(({ count }) => ({ count: count + 1 }));
return (
<>
<p>Count: {count}</p>
<button onClick={increment}>Increment</button>
</>
)
}
With that, it seems that the other approaches (connect and Connect) simply don’t make sense anymore. I’m highly considering rebranding Redux Zero to be all about this three hooks. No more, no less.
What do you think?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:10 (10 by maintainers)
Top Results From Across the Web
RFC 3435 - Media Gateway Control Protocol (MGCP) Version ...
1 Overview of Commands This section describes the commands of the MGCP. · 2 EndpointConfiguration The EndpointConfiguration command can be used to specify...
Read more >[RFC|Merged] General Hook Architecture of phpBB3.1
Functions to be called by a hook are identified by naming convention. The hook “foo” automatically invokes all MOD methods named “<MODNAME>_foo” ...
Read more >iCalendar Transport-Independent Interoperability Protocol (iTIP)
Please refer to the current edition of the "Internet Official Protocol Standards" (STD ... Binding documents such as [iMIP] focus on the transport...
Read more >componentWillMount is deprecated and will be removed in the ...
You should move all the code from the componentWillMount to the constructor or componentDidMount. componentWillMount() is invoked just ...
Read more >What you need to know about the React useEvent Hook RFC
log('Event handler'); } // ... } React destroys the current version of the handleEvent function and creates a new version each time AComponent ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @makinde, thanks for the feedback.
No, classes don’t support hooks. So the reason why I want to go all-in into hooks only API is:
I’m already building some experiments to drop support with Connect/connect and go all-in into hooks. And maybe even rebranding the project.
Thanks for responding. You should definitely feel empowered to direct things as you see best.
I’ll just quickly highlight some of what you gain with the current “redux-like” branding and messaging. Because I know that this library is supposed to be like redux, I can depend on their docs. For instance, I’m trying to learn middleware in redux-zero right now. The docs are…brief, to say the least. But because it is so similar to the redux concept, I can rely on the tons of documents and blog posts about the topic.
Just something to keep in mind as you consider diverging from redux in the future. Thanks for all the hard work on the tool!