components in React

React is a component based application. Therefore, there's going to be components. And within the components, there's going to be child components.  And potentially within those child components, there's even more child components. So everything within React is built up on components and these components render HTML.

 

A component is one of the fundamental building pieces of React. In other words, every application you create with React will be built up of bits known as components. 

 

Component are the the main player in react applicaition. Component has 2 parts

  • View for user interface - which is the rendering of the HTML, that a user can interact with.
  • JS that contains application logic / event handling for view

 

React is combination of Component, child Cmponents, 

 

 


Related Question