How to fix the React does not recognize the `basePath` warning?

Viewed 1328

I use react-admin and for the API I use useQuery and I have this warning in all my pages:

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)))

How can I fix it?

1 Answers

Not certain if this is your exact issue as there wasn't any provided code, but I figured it's worth sharing. I was getting the same warnings, from Create & Edit components of a resource, where I was using a SimpleForm.

I was using the MUI Grid to format these components.

However, SimpleForms only take in input components such as TextInput, AutocompleteInput, NumberInput etc. The solution appears to be creating a custom form component, that is able to handle different kinds of inputs.

Source from the man himself

Related