Toasted Notes
A super simple but flexible implementation of toast style notifications for React, initially based on the excellent implementation found in Evergreen.
Install:
yarn add toasted-notes
Example
API
The notify function accepts either a string, a react node, or a render callback.
It also accepts options.
Using Context
One downside to the current API is that render callbacks and custom nodes won't get access to any application context, such as theming variables provided by styled-components. To ensure that render callbacks have access to the necessary context, you'll need to supply that context to the callback.