chore(Notification): minor optimizations

This commit is contained in:
Julien Fontanet
2016-05-12 21:12:03 +02:00
parent de3abbf6b8
commit 3085749e92

View File

@@ -17,8 +17,17 @@ export class Notification extends Component {
instance = this
}
// This special component never have to rerender!
shouldComponentUpdate () {
return false
}
render () {
return <ReactNotify ref={notification => {
if (!notification) {
return
}
error = (title, body) => notification.error(title, body, 3e3)
info = (title, body) => notification.info(title, body, 3e3)
success = (title, body) => notification.success(title, body, 3e3)