different ways of using setState in react js code example Example: set state setState({ searchTerm: event.target.value })