React

96 articles · all categories

7 articles from 2022 · show all

November 2022

Reader question: useReducer or XState?

Following up from my article about XState and Stately.ai, fellow reader S. asked if `useReducer` could ever be relevant when using state machines in React code. Yes! Here's how

When your brain is breaking, try Stately.ai

Two years ago I wrote about using XState after building a UI interaction so twisted my brain leaked out my ears. It helped. Now the creators have made something even better – Stately.ai 😍

September 2022

useCallback is a code smell

One of my favorite ways to simplify and de-gotcha React code is to rip out all the useCallback and useMemo drama. 90% of the time you don't need it.

May 2022

Learnings about the future of the web from Reactathon

The first in-person conference in years! It was wonderful 🤩 - Remix is great - Serverless at edge is the future - GDPR does not play with 👆

March 2022

Adding categories to a Gatsby blog (for better SEO)

One of my biggest frustrations since migrating swizec.com from Wordpress to Gatsby was that I never added categories. Always wanted to, never did. Thought it would be super hard. Gatsby made it painless

February 2022

A new VSCode extension makes state machines shine on a team

When you grok state machines, a new world of computational beauty and software design opens in front of your eyes. Things that used to be hard become easy. The impossible becomes possible. And you turn into that annoying team member.

January 2022

How to add Typeform as a Gatsby source

Every year I ask readers if they're enjoying my newsletter. Then fail to use those responses 😅 This year I said heck it and built a /testimonials page that shows everyone's feedback raw from Typeform. Here's how.