You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run npm install && npm run build && serve -s build
Try changing fields in the first form (that uses React.useMemo under the hood). Notice that first input doesn't react to any keystrokes, and changing value of the second input doesn't update form values neither.
The second form (that doesn't use React.useMemo) works correctly.
Screen.Recording.2025-02-26.at.12.50.52.mov
Expected behaviour
Wrapping form or control in useMemo shouldn't prevent the form from responding to control.field.onChange calls.
So that one can pass the form and control objects downwards through react context, and benefit from useMemo and memo React functions.
Right now it's one of the other. If I use react-hook-form, I can't wrap some of my components with memo.
Version Number
7.54.2
Codesandbox/Expo snack
https://codesandbox.io/p/devbox/festive-wind-7zs3h7
Steps to reproduce
The bug can't be reproduced on a development build. You need to make a production build to see the bug.
npm install && npm run build && serve -s buildReact.useMemounder the hood). Notice that first input doesn't react to any keystrokes, and changing value of the second input doesn't update form values neither.The second form (that doesn't use
React.useMemo) works correctly.Screen.Recording.2025-02-26.at.12.50.52.mov
Expected behaviour
Wrapping
formorcontrolinuseMemoshouldn't prevent the form from responding tocontrol.field.onChangecalls.So that one can pass the form and control objects downwards through react context, and benefit from
useMemoandmemoReact functions.Right now it's one of the other. If I use react-hook-form, I can't wrap some of my components with
memo.What browsers are you seeing the problem on?
Chrome
Code of Conduct