View profile

Weekly Vue.js News - #45 - Provide fallback content for slots

Michael Hoffmann
Michael Hoffmann
Hi ๐Ÿ‘‹
Iโ€™m still working on rewriting my portfolio with Nuxt 3. I will soon publish a new blog post about creating custom code blocks in Nuxt Content v2.
In this issue, I show you how to provide fallback content in Vue slots and how you can make large JavaScript numbers more readable using numeric separators. Additionally, youโ€™ll find some interesting articles and tools that will help you to become a better Vue developer!
Have a great week โ˜€๏ธ

Michael Hoffmann
๐Ÿคฉ Look at all the content that I've created since last year ๐Ÿ’ช

My follower numbers are still not as high as expected but it is going in the right direction ๐Ÿ™ƒ
Vue Tip: Provide fallback content for slots
There are cases when itโ€™s useful to specify fallback (i.e. default) content for a slot, to be rendered only when no content is provided.
A typical use case is a slot inside a <button> where we define a fallback if no text content is provided.
Vue News
How To Structure a Massive Vuex Store for a Production App
Coding Better Composables
Building Vue components in TypeScript using Storybook
JavaScript Tip
Quote of the week
Tools & Misc
TypeScript Error Translator
Did you enjoy this issue? Yes No
Michael Hoffmann
Michael Hoffmann @mokkapps

This weekly Vue newsletter gives you high-quality tips and curated content to help you become a Vue.js expert.

Additionally, it provides content about web development topics like TypeScript, JavaScript, HTML5, and CSS3.

Published each Monday since June 2021.

In order to unsubscribe, click here.
If you were forwarded this newsletter and you like it, you can subscribe here.
Created with Revue by Twitter.
Holzapfelkreuther StraรŸe 19, 81375 Munich, Germany