The Missing v-switch Component @LachlanMiller
The Missing v-switch Component  @LachlanMiller
Uploaded January 2021 | Updated December 2026, 3 hours ago
NOTE: I realized (and others pointed out) the computed property is not necessary... see the pinned comment. Vue has all the usual programming constructs you might expect... for, if-else... but no switch statement. No problem, we can make it ourselves. It's on npm, try it out: github.com/lmiller1990/v-switch

📗 $5 off my Design Patterns for Vue.js with YT_5_OFF: lachlan-miller.me/design-patterns-for-vuejs
🐦 I'm on Twitter! twitter.com/Lachlan19900
The Missing v-switch ComponentRefactoring an App 2/2: Working Towards Immutability[Testable Forms] 1.8 Inputs, v-model and the number modifierPublishing a Vue.js 3 Component on npm[Testing Vue 3 apps] 1.10 - Mocking Vue Router with global.mocks[6/14]: Control Flow with v-if - Complete Vue.js 3 Course[Testable Forms] 1.11 Finalizing the Form ValidationIntroducing Vue Router MockVisual Guide to the Modern Frontend Toolchain (Vite)3 Ways to Avoid Prop Drilling in Vue/ReactSimple Functions and Conditionals (Advent of Vue #2)Testing Library Philosophy - [Vue Testing Library 2/8]
Lachlan Miller |

The Missing v-switch Component

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER