Frequently Asked Questions:


What is Context API?

Context Api provides a way to pass data through the component tree without passing down props manually at every level. Before the invention of context api, it was hard to pass data through child componenets. We had to pass data(as props) at every level of component tree , if we want to pass data to the tree of component. It's called props drilling. After the invention of context api we can easily pass data through the child component without props drilling.

What do u mean by symantic tag?

Symantic tag means a tag with meaning. HTML5 introduces us with symantic elements. A symantic element is clear both to the browser and developer. It is easier to understand the duty of every symantic tag because the tagname is meaningful to developer. A list of some symantic elements are given bellow:

  • header
  • nav
  • article
  • footer
  • section

What do u know about bloc, inline and inline-block element?

Block element: A block-level element is an HTML element that begins a new line on a web page and extends the full width of the available horizontal space of its parent element. Example: div, p, h1, h2, h3, h4, h5, h6, main, section, header, footer etc are block level elements

Inline element: Inline element takes the space only it needed and does not starts in a new line. inline elements takes place side by side. Example: img, button, a etc are inline elements

Inline-block: Inline-block is a inline element acts as a block element. Compared to display: inline, the major difference is that inline-block allows to set a width and height on the element. Also, with display: inline, top and bottom margins and paddings are not respected, and with display: inline-block they are. Now, the difference between display: inline-block and display: block is that, with display: block, a line break happens after the element, so a block element doesn't sit next to other elements.

,