-
Notifications
You must be signed in to change notification settings - Fork 8
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
add useMutationhandler documentation #725
add useMutationhandler documentation #725
Conversation
Hello jeanmarcmilletscality,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
It provide a way to define a callback to call on success and a toast to display after the fail or success of a mutation. | ||
It also allows to define a single toast and callback for multiple related mutations instead of managing each mutation individually. | ||
|
||
## Properties |
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.
Does not separate optional and mandatory props, and we said Props
it's better. I suggest you on chapter Props
with this kind of description for example :
mainMutation
- Type: MutationConfig
- Description: The primary mutation that needs to be executed and monitored.
- Optional (if it is otherwise display nothing)
|
||
</details> | ||
|
||
### Toast props |
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.
useless for me
<Canvas of={Stories.CustomToastStyle} sourceState="none" /> | ||
<Controls of={Stories.CustomToastStyle} /> | ||
|
||
### Callbacks |
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.
useless
This allows the rendering of a single message on success or failure, even when there are multiple mutations. | ||
As the return type is a React node it is possible to display simple message as well as more complex and detailed message. | ||
|
||
### Minimal Example |
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.
I'll call this part Example
or Usage
. And I'll give a really complete example of use. The aim here is to provide the developer with a complete example of use. Like here, for example: https://github.com/scality/react-chained-query
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.
LGTM
/approve |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
I have successfully merged the changeset of this pull request
Please check the status of the associated issue ARTESCA-11376. Goodbye jeanmarcmilletscality. |
Component:
Description:
Design:
Breaking Changes:
Closes: #ISSUE_NUMBER