How does React differ from vanilla JS/HTML/CSS?
- React is a User Interface library that utlizes JSX and JavaScript to render a front end of the website. The components built with React can be styled using CSS as well.
What is the primary difference between a function component and a class component?
- The primary difference is that you are calling a function where as with a class component you are calling a constructor. Calling the function provides efficeintcy gains over using a class component and can be written in fewer lines of code.
Functional Components
- A functional component is basically a JavaScript/ES6 function that returns a React element (JSX). source Children / Child Components
- Any component that is referenced in another component is a child of that component.