Javascript is required
Weekly Vue News Logo Weekly Vue News

Document is empty, overwrite this content with #empty slot in <ContentDoc>.

Weekly Vue.js News - #49 - Check if slot is empty

Migrated Issue
Expect missing links and broken styling, as this issue has been migrated from my previous newsletter service.

Hi 👋

In this issue, I have curated a few interesting articles and tweets to help you in your journey to become a Vue expert.

Have a great week ☀️


Vue Tip: Check if slot is empty

Inside the template, you can use $slots, an object representing the slots passed by the parent component.

Usage of slots inside <script setup> should be relatively rare, since you can directly access them as $slots in the template.

In the rare case where you need them, you can use the useSlots helper.

Vue News

Vue 3 was a mistake that we should not repeat

👉🏻 Important: The author thinks that Vue is probably the best framework out there.

👉🏻 "But the fact that there is no easy migration path from version 2 is a mistake we should not repeat in the future."

Nuxt 3 State Management: Pinia vs useState

👉🏻 In Nuxt 3 we get a new useState composable.

👉🏻 But how does it compare to Pinia?

👉🏻 Michael Thiessen discusses in this article the main differences and when to use each.

State of Vue 2022: Amsterdam recap State of Vue 2022: Amsterdam recaplaurentcazanove.com

A recap what Evan You discussed during the State of the Vuenion talk in Amsterdam two weeks ago.

Vue Report: Amsterdam 2022 Vue Report: Amsterdam 2022www.monterail.com

👉🏻 A 70-page 'Vue Report' on the state of the Vue.js community and project based on discussions at the recent Vue Amsterdam conference.

👉🏻 A great way to catch up and no registration or emails needed.


JavaScript Tip: JavaScripp: Use an array to combine several validationst Ti

A typical use case is to combine several validations using the && operator:

In my opinion, combining several validations in an array using the .every method is a cleaner solution:

Web Development News

Monorepos in JavaScript & TypeScript

 ğŸ‘‰ğŸ» How to structure a monorepo

👉🏻 Which tools to use

👉🏻 How to perform versioning

👉🏻 How to make continuous integration work

When You Should Prefer Map Over Object In JavaScript

Map objects are (nearly) universally available in JS implementations now and present some benefits to using regular Objects.

ğŸŽ§ TypeScript Tooling Explained

In this episode of Syntax, Wes and Scott talk through TypeScript tooling, build tools, configs, and editors.

ES2022 features in code

👉🏻 .at() method on built-in indexables

👉🏻 RegExp Match Indices

👉🏻 Object.hasOwn

👉🏻 Error cause

👉🏻 Top-level await

👉🏻 Class field declarations

👉🏻 Ergonomic brand checks for private fields

Code Review: How to make enemies

Iain provides ways of getting revenge on co-workers via code reviews:

👉🏻 Ask for changes that make no difference

👉🏻 Take your time when responding

👉🏻 Demand they add bugs

👉🏻 Create mega-sized pull requests

Start test names with “should”

👉🏻 It removes redundancy, because the function name should already be in the call stack.

👉🏻 Encourages testing one property of the function per test.

Quote of the week

Weekly Vue News LogoWeekly newsletter that gives you high-quality tips and curated content about Vue & Nuxt.
I will never share any of your personal data.
© 2023 weekly-vue.news. All rights reserved.