reading-notes

Component Composition

  1. Can a parent component access the state of a child component?

yes by using a callback function passed as a prop from the parent component.

  1. What can be passed along in a prop variable?

a method for the child component to use in order to send back information by name the prop variable and passing it’s state or other data.

  1. How can a child component “know” the state of another component?

Through information passed from a shared parent component or having child components of its own.

TERMS

component props - Properties of a component

component state - The current values of props after sets occurring from handler functions/events that will change the values and change what is rendered.

application state - Where in an applications program the program is being executed and the memory stored for the app.src

PREP

react basics

props.children

composition vs inheritance

react testing library api ex