Skip to content

Conversation

@incepter
Copy link

This RFC aim to invalidate the previous functions returned from useCallback as a way to prevent state functions from being invoked.

useCallbacks return functions are usually used as a way to update state from an async context while closing over some other variable. This leads in most of the cases to a stale state of the component and inconsistencies, plus memory leaks referencing lots of closure variables.

View formatted RFC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant