reading-notes

useState() Hook

Review, Research, and Discussion

  1. How does React differ from vanilla JS/HTML/CSS?
    a. React requires you to break the UI up into components, and create the initial state in JS.
    b. Vanilla JS starts everything out as a blank HTML page, and are you are able to structure everything anywya you like.
  2. What is the primary difference between a function component and a class component?
    a. A functional component is just a plain JavaScript function that accepts props as an argument and returns a React element.
    b. A class component requires you to extend from React. Component and create a render function which returns a React element.

Vocab

  1. Functional Components
    a. A Functional component is a function that takes props and returns JSX.
  2. Children / Child Components
    a. A component that recieves its props from its parent component, and data is always flowing one way.

Sources

  1. React vs Vanilla
  2. function vs Class
  3. functional Components