September 2024
Intermediate to advanced
174 pages
3h 44m
English
So far, we’ve used React to encapsulate the functionality of a single DOM element (<button>) in a component (CarouselButton). But React components are capable of doing more than that.
We’re going to build a component called CarouselSlide, which will be responsible for rendering several distinct DOM elements:
We’ll take a TDD approach to building this tree while ensuring that the props we provide to CarouselSlide are routed correctly. Start by creating a stub of the component, a minimal implementation you can add functionality to later:
| | // src/CarouselSlide.tsx ... |
Read now
Unlock full access