Let’s compare props and state. Here’s a definition of each: “props” (short for “properties”) is an object of arbitrary inputs a React function component accepts as the first argument. “state” is data that changes over the lifetime of a specific ...

In my Learn React Hooks workshop material, we have an exercise where we build a tic-tac-toe game using React’s useState hook (based on the official React tutorial). Here’s the Github file for the finished version of that exercise We have ...

Watch “Implement a simple Finite State Machine library in JavaScript” on egghead.io If you’re like me, the first time you heard the words “state machine” you were a little intrigued and as you dove in deeper, you were more confused ...

Watch “Use a status enum instead of booleans” on egghead.io Watch “Handle HTTP Errors with React” on egghead.io (part of The Beginner’s Guide to ReactJS) Let’s play around with the Geolocation API a bit and learn about the perils of ...

Managing state is arguably the hardest part of any application. It’s why there are so many state management libraries available and more coming around every day (and even some built on top of others… There are hundreds of “easier redux” ...