You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What you were expecting:
I can provide a store through react-redux' Provider and am not forced to provide a dataProvider on the <Admin> component.
What happened instead:
When I skip the dataProvider I get the error "Missing dataProvider prop.". If I pass the dataProvider too (which I don't need according to the docs and a quick look at CoreAdmin.tsx) multiple stores are created: The one I wrapped <Admin> in and another one that created.
Other information:
I had a look into CoreAdmin.tsx. I think you have to provide the CoreAdmin.contextType there in order to consume the context.store. As the context is empty during initialization the member variable this.reduxIsAlreadyInitialized is never set to true. That's why render wraps the renderCore into another <Provider> with a store from local createAdminStore(...).
Environment
React-admin version: 3.0.0-alpha.0
Last version that did not exhibit the issue (if applicable): Latest v2 afaik
React version: 16.8.1
Browser: Latest Chrome
Stack trace (in case of a JS error): No stack trace
The text was updated successfully, but these errors were encountered:
What you were expecting:
I can provide a store through react-redux' Provider and am not forced to provide a dataProvider on the
<Admin>
component.What happened instead:
When I skip the dataProvider I get the error "Missing dataProvider prop.". If I pass the dataProvider too (which I don't need according to the docs and a quick look at CoreAdmin.tsx) multiple stores are created: The one I wrapped
<Admin>
in and another one that created.Steps to reproduce:
Wrap
<Admin>
inside a<Provider>
with a store. We simply followed these steps: https://github.com/marmelab/react-admin/blob/next/docs/CustomApp.mdRelated code:
Other information:
I had a look into CoreAdmin.tsx. I think you have to provide the
CoreAdmin.contextType
there in order to consume the context.store. As the context is empty during initialization the member variable this.reduxIsAlreadyInitialized is never set to true. That's why render wraps the renderCore into another<Provider>
with a store from localcreateAdminStore(...)
.Environment
The text was updated successfully, but these errors were encountered: