Material-UI was started 3 years ago. The ecosystem has evolved a lot since then, we have also learned a lot. @nathanmarks started an ambitious task, rebuilding Material-UI from the ground-up taking advantage of this knowledge to address long-standing issues.
There are major breaking changes between v0.1x and v1. There is often no direct mapping from the v0.1x API to the v1 API so moving from v0.1x to v1 can require quite extensive changes. Luckily these don't all need to be done at one time and you can run v0.1x side by side with v1 while you move between versions.
To install v1 alongside v0.1x will will create a new package material-ui-next which aliases to the v1 release and leave material-ui pointing to the 0.1x release. We can then import components as follows:
import FlatButton from 'material-ui/FlatButton'; // v0.x
import Button from 'material-ui-next/Button'; // v1.x
Run the following commmand:
yarn add material-ui-next@npm:material-ui@next
??? Edit package.json ???
There are several major changes which impact all components
Styles => withStyles
OnTouchTap -> OnClick
### Avatar
<FlatButton label="Label" primary onTouchTap={handleTouchTap} />
<Button color="primary" onClick={handleClick}>Label</Button>
Removed
Convert to IconButton and Menu
NavigationMoreVert => MoreVert in material-ui-icons
PrimaryText => children
type="persistant" onRequestChange => onRequestClose