const React = require('react'); const alertStore = require('../store/alertStore.js'); const dispatcher = require('../dispatcher/dispatcher.js'); function alert() { let alert = alertStore.getAlert(); if (!alert) return
 
; let button; function dismiss() { dispatcher.dispatch({ type: 'alert-dismiss', alert }); } if (alert.dismissable) { button = ; } return (
{alert.message} {button}
); } module.exports = alert;