Rethinking Reusability in Vue
Explore new frontiers in reusability with the Composition API
Rethinking Reusability in Vue is 150+ pages of writing, code, and data viz, all in pursuit of Vue 3 best practices.
Explore new frontiers in reusability with the Composition API
Rethinking Reusability in Vue is 150+ pages of writing, code, and data viz, all in pursuit of Vue 3 best practices.
150+ pages of writing, code, and data viz
We've heard it said many times, in many different ways: the Vue Composition API opens new frontiers for reusable code.
We've been taught that reusable code will get rid of bloated data stores, all-powerful "God" components, state & functions in the global scope, prop drilling, naming collisions, and uncertainty & unpredictability.
And we've been promised that we can achieve this with the Vue Composition API.
But how does that actually work in practice? There's plenty of literature on reusable component patterns, but not much guidance or best practices for composables.
I've been exploring the possibilities of the Vue Composition API, and I've worked out the kinks in the function ref pattern, a composable pattern that improves the experience of authoring feature-rich, accessible user interfaces.
Rethinking Reusability in Vue is a deep dive into the function ref pattern, and best practices for composables.
The book compares and contrasts the function ref pattern with other Vue design patterns, like compound components, in pursuit of three goals:
Reusability is what separates good Vue code from great Vue code. Come learn everything I know about it!