Read Reviews About Your Favorite Book

What is Context API?

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.Before context API if any children need to access any data from parent the parent had to pass that data directly to the children. If the children is 2 3 or any level down from that parent the that data had to be passed down to that every level to be used in that down level. But Context API has solved that problem. COntext API produces a global variable so that if the children is any level down that children can use that data directly from the parent

Example : import React, createContext from "react";

const UserContext = createContext();

Now any children can use UserContext and access that value

What is Semantic Tag?

Semantic HTML elements are those that clearly describe their meaning in a human- and machine-readable way. Elements such as header , footer and article are all considered semantic because they accurately describe the purpose of the element and the type of content that is inside them.

On the other hand div , span this are non semantic elements. Because we can not define anything by seeing div ans span tags.

But bys seeing header footer article tags we understand that in the header tag there are the elements of the heads of a web page. There are many semantic tags.

Example: article, section , timer, nav etc

Semantic tags helps us to build a better web structure for our web page