Consider changing the next property type of the update object of the dispatchSetState function from any to null #30081
Labels
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
Hi!
It's not bug, but I think there is an unnecessary any type.
The type of the next property has changed since this commit.
I think the any type might be unstable. Considering future changes.
React version: 18.2.0
Steps To Reproduce
Link to code example:
before
after
The current behavior
When adding a function, the wrong type may be entered.
The expected behavior
Can improve type stability
The text was updated successfully, but these errors were encountered: