Skip to content
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

Fix Don't show a warning if only one argument is passed to useNotify #6760

Merged
merged 5 commits into from Nov 10, 2021

Conversation

WiXSL
Copy link
Contributor

@WiXSL WiXSL commented Nov 9, 2021

This PR avoids throwing a warning if only a message is used in useNotify callback call, since everything else is optional.

const  notify = useNotify();

// Warning: This way of calling useNotify callback is deprecated. Please use the new syntax passing notify("[Your message]", { ...restOfArguments })
notify('Showing a simple message'); 

@WiXSL WiXSL closed this Nov 9, 2021
@WiXSL WiXSL deleted the notification-warning branch November 9, 2021 14:19
@WiXSL WiXSL restored the notification-warning branch November 9, 2021 15:01
@WiXSL WiXSL reopened this Nov 9, 2021
@WiXSL WiXSL requested a review from djhi November 9, 2021 15:09
@djhi
Copy link
Contributor

djhi commented Nov 10, 2021

Thanks!

@djhi djhi added this to the 3.19.1 milestone Nov 10, 2021
@djhi djhi merged commit ad19414 into marmelab:master Nov 10, 2021
@WiXSL WiXSL deleted the notification-warning branch November 10, 2021 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants