useState
is one of the hooks available in React v16.8.0. It basically lets you turn your otherwise non-stateful/functional components to one that can have its own state.
At the very basic level, it's used this way:
const [isLoading, setLoading] = useState(true);
This then lets you call setLoading
passing a boolean value.
It's a cool way of having "stateful" functional component.