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’) was not found in ‘@material-ui/icons/Search’ (possible exports: __esModule, default)
export ‘Search’ (imported as ‘Search’) was not found in ‘@material-ui/icons/Search’ (possible exports: __esModule, default)
search icons is not imported,but i installed material packages and it is not showing in package.json
2
Answers
The correct import is:
If you haven’t already, you’ll have to install
You can find all of the icons here: https://mui.com/material-ui/material-icons/
if you look closely at your import statement
Wrong: /!
you are importing a module named Search, which already has a default export.
In order to use the default export you should use
Working:
If you want to import multiple icons you should use the route
/icons
,Then consume all the icons that you want here is how you can achieve that:
Working:
To install run: