Hide playlist

    Build a Toggle Component

    In this lesson, we’ll write a simple toggle component which will serve as the foundation for the rest of the course. Kent walks through how to create a simple toggle with React setState. He shows us how to extend the functionality of the toggle by safely adding an onToggle prop that gets called after state is updated. It is important to define default props when you are calling a method from props.

    Please take a moment to tell your friends:

    You must be a PRO Member to view code