0

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 (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 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.

Faiz Khan
  • 21
  • 3
  • if you have mui 5 then try this `npm install @mui/icons-material` – Usama Feb 17 '23 at 13:35
  • @Usama I am using the same library. and this are my libraries version "@mui/icons-material": "^5.11.9", "@mui/material": "^5.11.9", – Faiz Khan Feb 17 '23 at 14:28
  • @FaizKhan Hi, were you able to fix this in the end? I'm having trouble with the same error atm – JasperMW Apr 27 '23 at 11:17
  • @JasperMW Hey, sorry for the late reply but now i wasn't able to solve the issue as I think react native is not supporting the mui library. – Faiz Khan Jul 17 '23 at 08:12

0 Answers0