Write down the purpose of react-router.

React Router is a standard library for routing in React. It's a dynamic, client-side routing, allows us to build a single-page web application with navigation without the page refreshing as the user navigates. React router use components yo display individual information.

How does context-api works?

Context Api provides a way to pass data through the component tree without having to pass props down manually at every level.
To create context api you need React.createContext(). It returns a consumer and a provider. Provider is a component that as it's names suggests provides the state to its children and Consumer is a component that consumes and uses the state.

What is useRef hook in react ?

The useRef is a hook that allows you to persist values between renders.It can be used to store a mutable value that does not cause a re-render when updated.It can be used to access a DOM element directly.