Warning: React does not recognize the `basePath` prop on a DOM element.
See original GitHub issueExpected Behaviour: No warning of prop when Grid component is used inside SimpleForm component.
Current Behaviour: Getting below warning.
2.chunk.js:363015 Warning: React does not recognize the `basePath` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `basepath` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
in div (created by ForwardRef(Grid))
in ForwardRef(Grid) (created by WithStyles(ForwardRef(Grid)))
in WithStyles(ForwardRef(Grid)) (at boqitemcreate.js:129)
in div (created by FormInput)
Code:
<SimpleForm toolbar={<BoQCreateToolbar />} redirect={redirect}>
<Grid container spacing={1} style={{ width: 'auto' }}>
<Grid item xs={4}>
Environment
- React-admin version: 3.1.1
- Last version that did not exhibit the issue (if applicable):
- React version: 16.12.0
- Browser: Chrome/Opera
- Stack trace (in case of a JS error):
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to fix the React does not recognize the `basePath ...
Warning : React does not recognize the basePath prop on a DOM element. If you intentionally want it to appear in the DOM...
Read more >Unknown Prop Warning - React
The unknown-prop warning will fire if you attempt to render a DOM element with a prop that is not recognized by React as...
Read more >Warning: React does not recognize the `isOpen` prop on a DOM
prop on a DOM element. i got solved this issue. just change tag to Navlink because ActiveClassName is just suported Navlink.
Read more >React-admin - Upgrading to v4 - Marmelab
Keeping the basePath prop may result in unrecognized DOM props warnings, but your app will still work flawlessly even if you don't remove...
Read more >warning: react does not recognize the prop on a dom element.
react does not recognize the basepath prop on a dom element. If you are trying to attach custom data to a standard DOM...
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

Here’s an quick workaround that works by throwing away any props normally passed to an input:
I use it in my
<SimpleForm>to add notes and other non-input items to my forms:SimpleForm expects Input or Field components as children (as explained in the documentation). So it’s normal that you see warnings if you pass anything else.
for your use case, you need a custom form component.