-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Typically with useState, the setState function accepts either a value to set as the new state, or a function which can transform the old state to the new state. Using the function is safer as it can gracefully handles multiple setState calls in succession. To handle this, the set and redo function needs to check the type of newPresent, and if it is a function apply it to the old present to get newPresent.
pdarvasbrunocalou, carlesnunez, pdarvas and sqpchris
Metadata
Metadata
Assignees
Labels
No labels