-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Change recompose methods usage for React.memo #4786
Conversation
Note: Let me know that or if you find a cleaner solution. |
I think the problem comes from the fact that SimpleForm inspect its children props looking for an Therefore, I think you should set the -const TextField = props = > ( ...);
+const TextField = memo<FieldProps & TypographyProps>(props = > ( ...));
-const EnhancedTextField = memo<FieldProps & TypographyProps>(TextField);
-EnhancedTextField.defaultProps = {
- addLabel: true,
-};
+TextField.defaultProps = {
+ addLabel: true,
+};
-export default EnhancedTextField;
+export default TextField; Also, some of the tests import the non-decorated Field ( |
Thanks! |
#4731