Comment on Show HN: Redux with a UseState HookparentComments−harrisonhopeOP6yThanks. It uses useDispatch behind the scenes which I believe has a bit more overhead compared to using connect. It should be comparable performance-wise to using the normal react-redux hooks.−acemarke6yUh... wait, _what_?`useDispatch` has absolutely no overhead whatsoever. It's literally just `return store.dispatch`.There's also less "overhead" in the sense that it's not pre-binding action creators.If you meant to say `useSelector` here, that also has less overhead than `connect` because it's having to select less state and do fewer comparisons.
Comments
Thanks. It uses useDispatch behind the scenes which I believe has a bit more overhead compared to using connect. It should be comparable performance-wise to using the normal react-redux hooks.
Uh... wait, _what_?
`useDispatch` has absolutely no overhead whatsoever. It's literally just `return store.dispatch`.
There's also less "overhead" in the sense that it's not pre-binding action creators.
If you meant to say `useSelector` here, that also has less overhead than `connect` because it's having to select less state and do fewer comparisons.