-
Notifications
You must be signed in to change notification settings - Fork 351
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
Changed Toast init to notify #4026
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.
Hey, thanks!
One small thing I mentioned and we can merge!
@@ -18,6 +19,10 @@ export const useToast = () => { | |||
return id | |||
} | |||
|
|||
const notify = (options: string | NotificationOptions) => { |
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.
It probably should be another way round.
init should call notify :)
so that when notify is used - no deprecation warnings will happen
and when init is used - deprecation warning would happen
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.
ah, good point. updating PR now
Requested review, let me know if any other changes are needed! Trying to contribute more frequently! |
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'm okay with JSDocs deprecation warning instead of console.warn, we can forget about init method for few minor versions.
Fixes #4024
Description
added an alias for init, in the toast feature. you can now use notify instead of init. Init is still retained and marked with depreciated.
Also updated docs to use the new notify instead of init.
Types of changes