Is @material-ui/core and @material-ui/icons really needed as dependencies?
I was sort of surprised when checking in a package-lock.json file that so many packages had been installed when I added react-data-grid. After looking in to it, it seams that only icons are used from material-ui, which makes it seem kind of a heavy dependency.
I know a dependency does not equal me deploying a larger bundle, but I still want my dependencies to be manageable.
@markusjohnsson I would recommend these three tools to keep track of this "size" aspect when committing into new dependencies:
I might have a proposal to make the icons usable in this context. I would love to hear feedback on it, some of these items are optional:
import Clear from '@material-ui/icons/Clear';
function ClearIcon() {
return <svg viewBox="0 0 24 24" style={someStyles}>{Clear.path}</svg>;
}
You still get about 9 MB on your file system, for comparison:
@material-ui/icons something similar to https://github.com/react-icons/react-icons/blob/master/packages/react-icons/src/iconBase.tsx.I'm curious to learn more about the point where it's good enough. cc @eps1lon.
Maybe the best solution, in the context of this project, is to copy and paste the source of a few icons 馃槵.
Most helpful comment
I might have a proposal to make the icons usable in this context. I would love to hear feedback on it, some of these items are optional:
You still get about 9 MB on your file system, for comparison:
@material-ui/iconssomething similar to https://github.com/react-icons/react-icons/blob/master/packages/react-icons/src/iconBase.tsx.I'm curious to learn more about the point where it's good enough. cc @eps1lon.
Maybe the best solution, in the context of this project, is to copy and paste the source of a few icons 馃槵.