class MyComponent extends React.Component { constructor(props) { super(props); this.state = {/* initial state */} } }