-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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
[React 19], useCallback not needed now!!! #31913
Comments
Recommendation: Gradually audit your use of useCallback :
|
Hi @HAWKZ4 , thanks for your answere |
As @HAWKZ4 noted, |
@josephsavona As a summary, I will continue using useCallback and useMemo as before. The compiler will manage them, meaning that if it detects they are unnecessary, it will remove them from the output bundle. Otherwise, it will keep them as-is or optimize them further if it determines they can be written in a more useful way. |
my question is, in react 19, the usage of useCallback is deprecated, means react automatically memoize the functions in my functional component? or only memoize the function that hasn't any dependencies. please more clarification about this.
if it is not required, and my app already i used useCallback, and memo... i have any side effect if i continue used it or i need to removed from my app if i want to switch from 18 to 19
thanks.
The text was updated successfully, but these errors were encountered: