Using the Controlled Component
In this lesson, we'll learn how a user would use a controlled component from an app!
We'll cover the following...
Sending a Prop
We reach out to the user and let them know that we have implemented a pattern to cater for their specific use case.
Out of excitement, they get on to implement the change.
Here’s how.
Within the user app, they send a data-index
prop to every Header
element:
Press + to interact
// before<Expandable.Header />// now<Expandable.Header data-index={index} />
The index
is retrieved from ...
Access this course and 1400+ top-rated courses and projects.