1import React from 'react'; 2 3export default class Example extends React.Component { 4 state = { 5 x: 'x', 6 ...{ 7 y: 'y', 8 }, 9 }; 10 11 props; 12 13 static getInitialProps() {} 14 15 constructor(props, context) { 16 super(props, context); 17 this.state = { 18 ...this.state, 19 x: props.x, 20 }; 21 } 22 23 componentDidMount() { 24 fetch('http://example.com'); 25 new XMLHttpRequest().send(); 26 Uint16Array.from([1, 2, 3, 4, 5]); 27 new SharedArrayBuffer(16).slice(); 28 } 29 30 shouldComponentUpdate() {} 31 32 render() { 33 return <div>{this.state.x}</div>; 34 } 35 36 _handleWhatever() {} 37} 38