Go ProSign in
Advanced React Component Patterns

Advanced React Component Patterns

Autoplay

    Build a Toggle Component

    Kent C. DoddsKent C. Dodds

    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.

    You must be a Member to view code