Managing State in React

Aurooba and Brian are back with the series on building with React inside WordPress! In this episode, they dive into how state works in React and why ternary expressions are more common in JavaScript than they are in PHP. They break down the code of the accordion they've been building in React over the course of this series, focussing on exactly how it manages which item stays open or closed.

A full transcript of the episode is available on the website. Watch the video podcast on YouTube and subscribe to our channel and newsletter to hear about episodes (and more) first!

  • (00:00) - Introduction
  • (00:25) - Recap of where we are in the React series
  • (02:03) - Rerenders in React
  • (06:39) - What is state in React?
  • (10:40) - The expand() function
  • (14:30) - How a ternary expression works
  • (16:55) - Why are ternary expressions more common in JavaScript?
  • (20:33) - Where it makes sense to use a ternary experession
  • (26:09) - What's next?
  • (27:28) - Taking the editing experience into account when making a block

Creators and Guests

Aurooba Ahmed
Host
Aurooba Ahmed
(she/her) Developer building bespoke #WordPress solutions, tools, and blocks. My name is pronounced "oo-ROO-ba" — Default to kindness, folks.
Brian Coords
Host
Brian Coords
WordPress developer and writer blah blah
Managing State in React
Broadcast by