-
Notifications
You must be signed in to change notification settings - Fork 46k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: useCallback doesn't work sometimes inside memo component #29696
Labels
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
Comments
I identified the problem, it's <React.StrictMode> |
Yes I think so |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
React: 18.3.1
In the following snippet (taken from React documentation), the console.log prints always false because each time the component rerendered, useCallback returns a new function reference: (only when the component is nested inside ProductPage component, but if I put ShippingForm directly under App component useCallback works fine)
The text was updated successfully, but these errors were encountered: