reading-notes

<Login /> and <Auth />

Review, Research, and Discussion

  1. Why is the Context API useful?
    • it enables the user to exchange unique details and assits in solving propdrilling from all levels or the applied application.
  2. Can a component outside of a provider get its context?
    • yes through importing the useContext() hook
  3. What are some common use cases for using the Context API?
    • context is helpful in creating the layout of an application and affecting the color applied to the applicaiton.
  4. Describe “Context Hell”
    • the React Context hell is the nasty code you get taking advantage of the React Context API.

Vocab

  1. global state - data that is share throughout the entire application.
  2. global context - sharing state throughout the application without passing props.
  3. provider - parent component sending Context for its child component to consume.
  4. consumer - child component that takes in and uses the state/data that its parent’s sends down.