We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This allows us to make our adding of items uniform. How?
At first, this won't cause an issue:
NotifyActions.add({ type: 'notification' })
However, it gets problematic in the long term, and given the fact that we're prone to human error, like so:
// missing i from notification (notificaton) NotifyActions.add({ type: 'notificaton' })
To solve this, we'll use constants, like so:
NotifyActions.add({ type: SOME_CLASS.NOTIFICATION })
For this to work, we'll now start to require a short boilerplate for the library to work.
AltNotify.config.types('all', 'whatever', 'alerts', 'notification');
However, any undefined string passed to type will now cause the function to throw an error:
type
// this throws an error NotifyActions.add({ text: '' });
You'll have to create an all (or whatever name) type for this work:
all
NotifyActions.add({ type: SOME_CLASS.ALL })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This allows us to make our adding of items uniform. How?
At first, this won't cause an issue:
However, it gets problematic in the long term, and given the fact that we're prone to human error, like so:
To solve this, we'll use constants, like so:
For this to work, we'll now start to require a short boilerplate for the library to work.
However, any undefined string passed to
type
will now cause the function to throw an error:You'll have to create an
all
(or whatever name) type for this work:The text was updated successfully, but these errors were encountered: