import React from 'react'; import ReactDOM from 'react-dom'; import {Message} from 'semantic-ui-react'; class FlashAlerts extends React.Component { render() { let alerts = this.props.alerts.map((alert, i) => { return ; }); return alerts; } } export class Alert extends React.Component { constructor(props) { super(props); this.state = {visible: true}; } onDismiss = () => { this.setState({visible: false}); }; render() { if (this.state.visible) { return ( ); } return null; } } export default FlashAlerts;