3 Kinds of Props in Vue

February 2024

One of Vue's core features is the use of props. Props are how we pass data around in Vue, from parent to child components. But not all props are created equal.

The 6 Levels of Reusability

February 2024

We all want to write less code, but get more done. To make this happen, we build our components so they can be reused more than just once.

SSR Safe Dynamic IDs in Vue

January 2024

Dynamic IDs are useful for testing, but can get tricky with SSR. Let's make a directive to do this easily, in both vanilla Vue and in Nuxt.

Controlled Props Pattern

January 2024

There are a few instances where you want to be able to override the internal state of a component and force it open from the parent. The controlled props pattern is designed for exactly this situation.

Building a (Totally) Unnecessary If/Else Component in Vue

July 2023

I decided to do something a little weird, and maybe you’ll think I’ve gone (slightly) insane. I wanted to see what it would look like to make an `If...Else` component.

The Extract Conditional Pattern in Vue

June 2023

An extremely common question I get asked all the time is, “how do you know when to split up a component?” I want to share a simple pattern with you that is basically fool-proof, and can be applied to lots of components with almost no thought.

6 Reasons to Split up Components

June 2023

Take your components and break them up into smaller pieces. Or create new components and composables that let you encapsulate and reuse code in a better way. This is the simplest way to clean up your Vue app and make you and your team more productive.

The Hidden Components Pattern

April 2023

There might be components hidden inside of your existing components. Finding them and extracting them will make your code simpler, and easier to use.