Skip to content

Instantly share code, notes, and snippets.

@andrey-skl
Last active December 2, 2016 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrey-skl/039e4bed721b158931e6e4edfd1280bf to your computer and use it in GitHub Desktop.
Save andrey-skl/039e4bed721b158931e6e4edfd1280bf to your computer and use it in GitHub Desktop.
Alerts example
import Alert from 'alert';
<Alerts>
{myStore.alerts.map(alert => {
<Alert key={alert.key} onClose={() => ...remove alert from store}>{alert}</Alert>
})}
</Alerts>
import {AlertsContainer} from 'alert';
<AlertsContainer/>
...
import Alert from 'alert';
Alert.showError(<Alert>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment