2019-02-19 22:45:07 +01:00
|
|
|
import React, { Component } from 'react'
|
2018-09-11 20:03:20 +02:00
|
|
|
|
|
|
|
export default class extends Component {
|
|
|
|
constructor (props) {
|
|
|
|
super(props)
|
|
|
|
|
|
|
|
this.state = {
|
|
|
|
mounted: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
componentDidMount () {
|
2019-02-19 22:45:07 +01:00
|
|
|
this.setState({ mounted: true })
|
2018-09-11 20:03:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
render () {
|
2019-05-30 03:19:32 +02:00
|
|
|
return (
|
|
|
|
<p id='mounted'>
|
|
|
|
ComponentDidMount{' '}
|
|
|
|
{this.state.mounted ? 'executed on client' : 'not executed'}.
|
|
|
|
</p>
|
|
|
|
)
|
2018-09-11 20:03:20 +02:00
|
|
|
}
|
|
|
|
}
|