Game Of Code Quiz

Question Answer

What is the purpose of react router?

ReactJS Router is mainly used for developing Single Page Web Applications. React Router is used to define multiple routes in the application.
When a user types a specific URL into the browser, and if this URL path matches any 'route' inside the router file,
the user will be redirected to that particular route.

How does context api work?

The React Context API is a way for a React app to effectively produce global variables that can be passed around.
This is the alternative to "prop drilling" or moving props from grandparent to child to parent, and so on.
Context is also touted as an easier, lighter approach to state management using Redux.

What is useref in react?

useDeferredValue accepts a value and returns a new copy of the value that will defer to more urgent updates. If the current render is the result of an urgent update,
like user input, React will return the previous value and then render the new value after the urgent render has completed. This hook is similar to user-space hooks
which use debouncing or throttling to defer updates. The benefits to using useDeferredValue is that React will work on the update as soon as other work finishes instead of waiting for an arbitrary
amount of time, and like startTransition, deferred values can suspend without triggering an unexpected fallback for existing content.