React中MUI初始化和方法调用

React中MUI初始化和方法调用

step1:引用

npm install @mui/material @emotion/react @emotion/styled

step2:D:\vue\untitled2123\src\App.tsx

import React from 'react';
import logo from './logo.svg';
import './App.css';
import Button from '@mui/material/Button';

function App() {

    const GetAmount = (strAmount: number, grams: number) => {
        return strAmount + grams;
    };

    const Tile = () => {
        console.log('you click button')
    }

    return (
        <div className="App"

你可能感兴趣的:(typescript,react.js,javascript,ecmascript)