<Login />
and <Auth />
The Context API is a React structure that enables you to exchange unique details and assists in solving prop-drilling from all levels of your application.
With the introduction of react-hooks in
v16.8.0
, you can use context in functional components by making use of useContext hook
React Context hell is the bad code you get taking advantage of the React Context API.
restricts network access based on a person’s role within an organization and has become one of the main methods for advanced access control.
The roles in RBAC refer to the levels of access that employees have to the network.
Install:
npm i react-cookie
impotr:
const [cookies, setCookie, removeCookie] = useCookies(['cookie-name']);
cookies
Javascript object with all your cookies. The key is the cookie name.
setCookie(name, value, [options])
Set a cookie value
value (string | object): save the value and stringify the object if needed |