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

[DataGrid] Remove dependency on lodash #7

Closed
oliviertassinari opened this issue May 24, 2020 · 1 comment
Closed

[DataGrid] Remove dependency on lodash #7

oliviertassinari opened this issue May 24, 2020 · 1 comment
Labels
component: data grid This is the name of the generic UI component, not the React module! performance
Milestone

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented May 24, 2020

While lodash was inlined in the repository (I guess to hide, on the surface, the dependency on this library), I don't think that it removes the fact that we depend on it. I would be in favor of completely removing its modules from the codebase.

Possible migration plan:

  • denounce. Instead of the 938 B version of lodash we could rely on the 305 B import { denounce } from @material-ui/core module. We could also move the module to @material-ui/utils instead of the core if that makes more sense. This module also has the advantage of being deduplicated with the core components, sharing the simple source.
  • deep equal. Instead of the 3.8 Kb version of lodash, we could replace it with fast-deep-equal, a 414 B alternative. I have only seen one use case in the codebase, I even wonder if we couldn't use JSON.stringify directly.

https://github.com/mui-org/material-ui-x/blob/fb5af45b5d74ca818fc6945af17400cec0ee21a2/packages/grid/src/hooks/root/useColumns.tsx#L162

@oliviertassinari oliviertassinari added this to the Post MVP milestone May 24, 2020
@oliviertassinari oliviertassinari changed the title [RFC] Remove dependency on lodash [DataGrid] Remove dependency on lodash Apr 24, 2021
@oliviertassinari oliviertassinari added the component: data grid This is the name of the generic UI component, not the React module! label Apr 24, 2021
@oliviertassinari
Copy link
Member Author

Closing for #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! performance
Projects
None yet
Development

No branches or pull requests

1 participant