title: Reactjs fade div with inline styles
body: <p>How can I add a <strong>fade-in</strong> animation to <code>&lt;div&gt;fading-in text&lt;/div&gt;</code> using only <strong>inline styles</strong>?</p>
  
  <pre><code>class Practise extends Component {
    state = { show: false };
  
    componentDidMount() {
      setTimeout(() =&gt; {
        this.setState({ show: true });
      }, 2000);
    }
  
    render() {
      if (!this.state.show) return &lt;div&gt;default regular text&lt;/div&gt;;
      return &lt;div&gt;fading-in text&lt;/div&gt;;
    }
  }
  </code></pre>
  
  <p><em>(No library solutions please, I want to figure it out natively)</em></p>