-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFR] Add withDataProvider HOC and Query/Mutation components to ease custom queries #2899
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! And the documentation is really good too 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A big step for React Admin users 🎉
The file Actions.md
should be renamed to Querying.md
.
That said, all the links to the Actions will be broken. (which is already the case, because you renamed all the titles)
IMO, it would be nice the keep the file Actions.md
with the current titles but with a big red warning at the top to notice users that the documentation has been updated.
This Actions.md should not be linked to the menu, but still should be available.
I'm not fan of writing a redirection page in Markdown - and I 'm not even sure it's possible. Let's keep the file name (and the URL) as it is, as the menu label has been properly changed. |
Problem
Calling the API directly is a bit cumbersome, especially when handling side effects or chaining calls. We need a better way to do that.
Solution
withDataProvider()
HOCwithDataProvider()
HOC<Query>
component<Query>
component<Mutation>
component<Mutation>
componentNote: Of course we'll use a hook for that once we make the move to React 16.8.
Sample Syntax
withDataProvider
Query
Mutation
Closes #2645