The verbosity of the Redux connect example can be reduced by using the official API and some JS syntax:
import{connect}from'react-redux'import{increase,decrease}from'./actions'/** same component here **/exportdefaultconnect(state=>({count:state}),{decrease,increase})(Counter)
No need to create mapDispatchToProps intermediate functions. It is less verbose than cerebraljs :).
It has an edge over the presented Cerebral equivalent as it uses the correct JS references instead of some some template string + string references which removes typings, linter features, autocomplete, IDE functions etc.
If you want to be fair, you also have to add propTypes in both examples, not only in the redux examples.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The verbosity of the Redux connect example can be reduced by using the official API and some JS syntax:
No need to create mapDispatchToProps intermediate functions. It is less verbose than cerebraljs :).
It has an edge over the presented Cerebral equivalent as it uses the correct JS references instead of some some template string + string references which removes typings, linter features, autocomplete, IDE functions etc.
If you want to be fair, you also have to add propTypes in both examples, not only in the redux examples.