Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm using the latest stable version of Material UI in my production React app.

I need the updated Data Tables component, which is currently in Material UI's unstable alpha branch.

I don't want to upgrade my whole app with npm i material-ui@next because of the numerous breaking changes.

How can I access the alpha library without upgrading my whole library? Can I install two versions of MUI? Can I call on the alpha API without installing it through NPM?

Thanks in advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
776 views
Welcome To Ask or Share your Answers For Others

1 Answer

After some googling, found this. To use both versions:

yarn add material-ui@latest
yarn add material-ui-next@npm:material-ui@next

Then you can use

import Divider from 'material-ui-next/Divider'

or

import Divider from 'material-ui/Divider'

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...