I used npm install @mui/material
and npm install @mui/icons-material
right after to import a search icon. my code looks like this
import {Search} from "@mui/icons-material";
However, when I write it in my code as <Search />
I get this error.
What is the issue?
The package you are trying to use is a set of react components. In other words, you can't use it without React. Have a look at this .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.