0
点赞
收藏
分享

微信扫一扫

reactjs安装并在脚手架中使用 material-ui/core

夏木之下 2022-03-11 阅读 87


npm install @material-ui/core

reactjs安装并在脚手架中使用 material-ui/core_css

import Button from '@material-ui/core/Button';

function App1() {
return <Button variant="contained">你好,世界</Button>;
}

export default App1

引入:

import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App1 from './MuiDemo';
import reportWebVitals from './reportWebVitals';

ReactDOM.render(
<React.StrictMode>
<App1 />
</React.StrictMode>,
document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();

官方链接:https://mui.com/zh/getting-started/usage/



举报

相关推荐

0 条评论