Material UI Icons cause to "invalid hook call" issue
See original GitHub issueHi. I use a simple template example sign-in in my own project
After starting the project Chrome is showing me error “Invalid hook call. Hooks can only be called inside of the body of a function component.”

Using trial and error I’ve found that the line "LockOutlinedIcon " causes the problem.
<Avatar className={classes.avatar}>
<LockOutlinedIcon />
</Avatar>
Any icon I use through import LockOutlinedIcon from '@material-ui/icons/LockOutlined'; causes the error.
Environment Material-UI core - 4.3.1 Material-UI icons- 4.2.1 React - 16.8.6 React-dom - 16.8.6
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Why I'm getting this Error: Invalid hook call. Hooks can only be ...
Why I'm getting this Error: Invalid hook call. Hooks can only be called inside of the body of a function component/ · You...
Read more >Material UI Icons cause to "invalid hook call" issue #16884
After starting the project Chrome is showing me error "Invalid hook call. Hooks can only be called inside of the body of a...
Read more >Material UI error: Invalid hook call. Hooks can only be called ...
Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the...
Read more >Invalid hook call error using Material UI : r/reactjs - Reddit
Solutions tried: Delete react folder from node_modules: not ideal since this project is being worked with a team and will be deployed to...
Read more >React Hook Errors with Material UI inside Forge Confluence ...
Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@ithinco I would encourage you to report your issue on StackOverflow, you should likely find better luck.
👋 Thanks for using Material-UI!
We use the issue tracker exclusively for bug reports and feature requests, however, this issue appears to be a support request or question. Please ask on StackOverflow where the community will do their best to help. There is a “material-ui” tag that you can use to tag your question.
If you would like to link from here to your question on SO, it will help others find it. If your issues is confirmed as a bug, you are welcome to reopen the issue using the issue template.