DEV Community

Discussion on: useState or const: what's the difference?

Collapse
 
omgitsgod profile image
Ryan Penchenski

Wouldn't you need a "setNeedsTacos" to trigger a re-render?

Collapse
 
dance2die profile image
Sung M. Kim

Yes, you are right, Ryan.

Updating the state using setNeedsTacos "can" cause the re-render.