Skip to main content

Watch: Conditional Rendering in React

By Michael Chan

JavaScript

Share:

Free JavaScript Book!

Write powerful, clean and maintainable JavaScript.

RRP $11.95

Today we’ll build upon last week’s Stopwatch component with conditional rendering. We’ll conditionally show the start and stop buttons based on the state of our component. Additionally, we’ll add a reset button so we can reset the timer.

This is part 2 of the Building a Stopwatch in React series.

Loading the player…

Michael is obsessed with teaching. He designs at Planning Center Online, organizes Full Stack Talks in San Diego, and teaches React.js at SitePoint. He thinks his wife and two ridiculous kids are super great. Also ramen.

New books out now!

Learn how Git works, and how to use it to streamline your workflow!


Google, Netflix and ILM are Python users. Maybe you should too?