Components and Props
Split a UI into components, pass data down with props, use children for composition, and understand why props are read only.
- Level
- Beginner
- Chapters
- 4
- Exercises
- 1
- Reading time
- 15 min
What you will cover
- 1. Thinking in ComponentsHow to break a screen into components and where to draw the lines.
- 2. Passing PropsHow data flows from parent to child, and why props cannot be changed by the child.
- 3. Children and CompositionThe children prop, and using components as slots instead of piling on options.
- 4. Props in PracticeSpreading props, forwarding the rest, and building a reusable component.
Up next after this one: State with useState