Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 1.65 KB

File metadata and controls

11 lines (8 loc) · 1.65 KB

Reading Notes Class 301

  • What is a “component”? Components are independent and reusable bits of code. They serve the same purpose as JavaScript functions, but work in isolation and return HTML. Components come in two types, Class components and Function components, in this tutorial we will concentrate on Function components.

  • What are the characteristics of a component? There are two types or characteristics of components.....Class components and Functions components.

  • What are the advantages of using component-based architecture? The benefits are reduced development and testing time, enhanced reliability (because components are pre-tested), and the flexibility to change applications by adding or replacing components without major disruption.

  • What is “props” short for? It is derived from the word "props," which is short for "proper respects" and is used to show respect for someone's accomplishments or actions. It can be used to give someone credit for a job well done or to acknowledge a difficult task.

  • How are props used in React? Props are used to store data that can be accessed by the children of a React component. They are part of the concept of reusability. Props take the place of class attributes and allow you to create consistent interfaces across the component hierarchy.

  • What is the flow of props? React, a Javascript library, uses unidirectional data flow. The data from the parent is known as props. You can only transfer data from parent to child and not vice versa. This means that the child components cannot update or modify the data on their own, makeing sure that a clean data flow architecture is followed.

Additional Information