Created
May 1, 2017 16:36
-
-
Save kocisov/510471c46826e2475caf9fa7b7f0beca to your computer and use it in GitHub Desktop.
for smart bois
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
// 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