DEV Community

Discussion on: Feature request: [state,,updateState] = useState(...)

Collapse
 
stojakovic99 profile image
Nikola Stojaković • Edited

I don't quite see the point of having this. setState method already updates the state. Also, I think you should actually split your object in three useState hook calls. To be honest, I'm still learning about Hooks API but that's what I understand so far by seeing examples of hooks usage.

Collapse
 
ipavlenko profile image
Igor Pavlenko

There is no batching for setState calls yet. My suggestion may solve this problem.