Created
February 4, 2017 20:12
-
-
Save veelenga/ed8894e251df870f01d57330def6655a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FlashMessages extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { messages: props.messages }; | |
} | |
render () { | |
return( | |
<div> | |
{ this.state.messages.map( message => | |
<Alert key={ message.id } message={ message } />) } | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment