You Don’t Know useState Until You’ve Used Functional Updates
When we might need useState functional updates and how to use them
Published in
5 min readJan 13, 2021
When we need to hold any state, useState
is the most common solution in React nowadays. It returns the current state value and a method to update it:
const [state, setState] = useState(initialValue);