export default class extends Component {
функции(){}
функции(){}
render() {
}
}
class ClassName extends PureComponent{
constructor(props) {
super(props)
this.testMethod = this.testMethod.bind(this);
console.log('constructor')
}
componentDidMount() {
console.log(123 + 'componentDidMount')
this.testMethod();
}
testMethod() {
console.log('testMethod')
}
render(
console.log('render до return')
return <div id='component'>
{console.log('render')}
</div>
)
// console.log(123); // вызовет ошибку
}