June 2019
Intermediate to advanced
192 pages
4h
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. Next, we’ll build the CarouselSlide component, 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.js ... |
Read now
Unlock full access