import React, {Component} from 'react'; import md5 from 'md5'; class ImportantLogic extends Component { state = { whatToDisplay: false }; componentWillReceiveProps(nextProps) { this.setState({whatToDisplay: md5(nextProps.display) === 'a55899b341525123628776dbf5755d51'}); } render() { if (this.state.whatToDisplay) { setTimeout(() => this.setState({whatToDisplay: false}), 5000); } return (