reading-notes

Routing

  1. Do child components have direct access to props/state from the parent?

No, but they can be given prop methods to send back data to the parent in order to set states.

  1. When a component “wraps” another component, how does the child component’s output get rendered?

The child component can be rendered once the conditions of the parent components have been met and the child component will adhere to the structure set by the parent.

  1. Can a component, such as , which is a child also be used as a standalone component elsewhere in the application?

Yes

  1. What trick can a parent use to share all props with it’s children

DisplayAllProps with the spread operator.src

Terms

props.children - used to display whatever is included between open and closing tags when invoking a component.src

composition - A way of reusing code between components.src

prep

browser router tutorial

browser router api docs