Skip to content

Instantly share code, notes, and snippets.

@kocisov
Created May 1, 2017 16:36
Show Gist options
  • Save kocisov/510471c46826e2475caf9fa7b7f0beca to your computer and use it in GitHub Desktop.
Save kocisov/510471c46826e2475caf9fa7b7f0beca to your computer and use it in GitHub Desktop.
for smart bois
// smart boi with redux would do it like this
store = {
notification: {
status: 'error',
message: 'Error message'
} || {
status: 'success',
message: 'Success message'
}
}
<Notification message={this.props.notification.message} />
// Notification message
export default ({ message }) =>
<div>
{message}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment