React toast notification components
A package for creating toast notifications in a React application.
Install the package and its dependencies.
1. Install the peer dependencies:
```
npm install react@^16 styled-components@^5
`
2. Install the package:
`
npm install @splunk/react-toast-notifications
Only import these once. See Usage for details.
`js`
import ToastMessages from '@splunk/react-toast-notifications/ToastMessages';
import Toaster, { makeCreateToast } from '@splunk/react-toast-notifications/Toaster';`js`
import { TOAST_TYPES } from '@splunk/react-toast-notifications/ToastConstants';
Both @splunk/react-toast-notifications and React support production and development builds. The production build removes warnings and guidance from the output. To create a production build, set the environment variable NODE_ENV to "production"` and use the webpack DefinePlugin to inject the variable into the code.