The useState hook is used to add state to a function component. This hook must be called from inside a component or another hook. The useState hook returns an array with two values. The first value is the current state and the second value is a function that you can use to update the state.