Skip to content
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

[internal][pickers] Move validation from config to module #26074

Merged
merged 3 commits into from
May 1, 2021

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Apr 30, 2021

Instead of having a higher-order hooks that is passed around as a config object we can compose hooks and create a module for these hooks.

Composing hooks is what we usually do and I see not benefit of higher-order hooks other than saving dependency argument. I'd be very surprised if that had any perf impact.

Using a module instead of a config object allows for better dead-code elimination via tree-shaking.

@eps1lon eps1lon added performance component: pickers This is the name of the generic UI component, not the React module! labels Apr 30, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented Apr 30, 2021

Details of bundle changes

@material-ui/lab: parsed: -0.11% 😍, gzip: -0.22% 😍

Generated by 🚫 dangerJS against 67976ee

@eps1lon eps1lon force-pushed the chore/pickers/makeValidation branch from a732478 to 67976ee Compare April 30, 2021 19:42
@eps1lon eps1lon marked this pull request as ready for review April 30, 2021 20:08
@eps1lon eps1lon changed the title [internal][pickers] Extract validation from config into module [internal][pickers] Move validation from config to module May 1, 2021
@eps1lon eps1lon merged commit 19c21d4 into mui:next May 1, 2021
@eps1lon eps1lon deleted the chore/pickers/makeValidation branch May 1, 2021 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants