Just starting (again) with material UI and react. There are two packages material-ui and @material-ui, which is the best starting point (latest) as of 2019-07 timeframe?
I think it is npm install @material-ui/core
based on ... https://material-ui.com/getting-started/installation/. The GIT repo is at https://github.com/mui-org/material-ui
Simple question, hopefully simple answer.
Other questions I looked at:
Use Create-React-App with Material UI - This answer says to use npm install --save material-ui
but because it is 2 years old, I think it may be out of date.
Difference between Material-Ui and Material-Ui-Next
How to install Material-UI Docs WITHOUT installing material-ui?
@material-ui/core
is the correct one to use for v4. For v5, the equivalent package is @mui/material
.
If you go to https://www.npmjs.com/package/material-ui, you'll see that material-ui
is deprecated. The last stable version in the material-ui
package was 0.20.2
. For the 1.0 release it moved to @material-ui/core
and for the stable release of v5 it moved to @mui/material
.
The @material-ui
scope (for v4) is used for the following packages that are all managed within the monorepo you referenced (https://github.com/mui-org/material-ui/tree/v4.12.3/packages):
Similarly, the @mui
scope (for v5) is used for the similar set of packages supported for v5 (https://github.com/mui-org/material-ui/tree/master/packages):
@material-ui/core
@material-ui/core
. @mui/core
is a new package for unstyled (no Material-Design CSS applied) versions of the components.withStyles
and makeStyles
JSS-backed styling APIs and is not recommended for use in new projects.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With