ButtonBase didn't accept function as component property
See original GitHub issueIn upgrading material v3.9.3 to v4.0.0 error happens. The error happens only in v4.0.0. I am trying to pass NavLink component to Tab.
ButtonBase.js:142 Uncaught (in promise) Error: Material-UI: expected an Element but found null. Please check your console for additional warnings and try fixing those. If the error persists please file an issue.
Wrapping NavLink with class component resolve this issue.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
ButtonBase didn't accept function as component property
I am trying to pass NavLink component to Tab. ButtonBase.js:142 Uncaught (in promise) Error: Material-UI: expected an Element but found null.
Read more >'styled()' function drops 'component' prop support
ButtonBase is working as expected, but suddenly there is an error from Typescript, telling that there is no 'component' prop on MyButton ....
Read more >ButtonBase API - Material-UI
Name Type Default
action func
buttonRef union: func | object
centerRipple bool false
Read more >Making your components extensible with TypeScript
Adding custom properties. For the sake of simplicity, I'm going to introduce two props: id and onClick . We want the button to ......
Read more >Higher-Order Components - React
Use HOCs For Cross-Cutting Concerns · Don't Mutate the Original Component. Use Composition. · Convention: Pass Unrelated Props Through to the Wrapped Component....
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
My code sample - I was using the incorrect prop name. All good, code working now.
Not sure what you’re referring to. The documented fix doesn’t use
ref
butinnerRef
for that exact reason. A future react-router version wouldn’t needinnerRef
anymore.