DEV Community

Discussion on: How to use useReducer hook to mimic setState method?

Collapse
 
jperasmus profile image
JP Erasmus

If you look at the React source code, you'll see that useState actually uses useReducer internally.

github.com/facebook/react/blob/720...