File size: 402 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import React, { Component } from 'react'

export default class extends Component {
  constructor(props) {
    super(props)

    this.state = {
      mounted: false,
    }
  }

  componentDidMount() {
    this.setState({ mounted: true })
  }

  render() {
    return (
      <p>
        ComponentDidMount{' '}
        {this.state.mounted ? 'executed on client' : 'not executed'}.
      </p>
    )
  }
}