updating the state in react class component code example Example: set state setState({ searchTerm: event.target.value })