So I have installed @material-ui/icons library along with npm install @mui/material library as suggested. but my issue is when I am importing any icons from the website and implementing it in my app.js return statement I'm getting this error log.
Invariant Violation: View config getter callback for component
style
must be a function (receivedundefined
). Make sure to start component names with a capital letter.
This error is located at:
in style (created by Insertion)
in Insertion (created by MuiSvgIconRoot)
in MuiSvgIconRoot
in SvgIcon
in CancelIcon
in RCTView (created by View)
in View (created by App)
in App
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in MaterialIconDemo(RootComponent), js engine: hermes
ERROR Invariant Violation: View config getter callback for component path
must be a function (received undefined
). Make sure to start component names with a capital letter.
This error is located at:
in path
in svg (created by MuiSvgIconRoot)
in MuiSvgIconRoot
in SvgIcon
in CancelIcon
in RCTView (created by View)
in View (created by App)
in App
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in MaterialIconDemo(RootComponent), js engine: hermes
ERROR Invariant Violation: View config getter callback for component style
must be a function (received undefined
). Make sure to start component names with a capital letter.
This error is located at: in style (created by Insertion) in Insertion (created by MuiSvgIconRoot) in MuiSvgIconRoot in SvgIcon in CancelIcon in RCTView (created by View) in View (created by App) in App in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in MaterialIconDemo(RootComponent), js engine: hermes
I want to know what I'm doing is wrong while installing or importing the library.
I tired the installation guide as well as searching solutions but there are no solutions for this particular library which I was able to find.
I know about vector-icons library and I have used it in my previous projects but I want to use this particular library.