import React from 'react' import {Search} from "@material-ui/icons/Search" const App = () => { return ( <div> <Search/> </div> ) } export default App
Export 'search' (imported as 'search') not found in '@material-ui/icons/Search' (possible export: __esModule, default)
Export 'search' (imported as 'search') not found in '@material-ui/icons/Search' (possible export: __esModule, default)
The search icon is not imported, but I installed the material package, but it is not displayed in package.json
If you look carefully at your import declaration
mistake:/!\
You are importing a module named "Search", which already has a default export.
In order to use the default export you should use
Work:
If you want to import multiple icons, you should use route
/icons
,Then use all the icons you want, here's how to achieve this:
Work:
Install and run:
The correct import is:
You must install it if you haven’t already
You can find all icons here: https://mui.com/material -ui/material-icons/