The new <SaveContextProvider>, deprecated-message of React-Admin

Viewed 932

I have this message in the Chrome console since I updated react-admin to version 3.10.0, I tried to dig into the document but can't find any information or example. Anyone encounter this, or luckily any members of react-admin seeing this, please help!

Edit or Create child components must be used inside a <SaveContextProvider>. Relying on props rather than context to get persistence related data and callbacks is deprecated and won't be supported in the next major version of react-admin.
1 Answers

I have a form component, using <SimpleForm>, that is used in <Edit> and <Create> components. There is no warnings when app is running.

But I have the same issue when unit tests are running on the form component. I tried to wrap it inside a <SaveContextProvider> without success... if someone have solution !

So if you encounter the issue during runtime you should verify that your form component is well wrapped as mentioned in the warning.

Related