DEV Community

Discussion on: React doesn't need state management tool, I said

Collapse
 
malixsys profile image
Martin Alix

You probably don’t need useRef for dispatch if you use the function version of setState: setState(old => ({…old, key:val})) 🤔