Javascript is required
Weekly Vue News Logo Weekly Vue News

Hi πŸ‘‹

I deleted my account at Revue as they will shut down in January 2023.

This is the first issue that is sent via my custom-built newsletter solution:

I store the subscriber list on Supabase, manage the content as Markdown files on my Nuxt 3-powered newsletter website and send the emails using Amazon SES.

If you have any problems with this email, please email me! It's also possible to read it online.

Be sure to add newsletter@weekly-vue.news to your email contact list. Doing this protects against overzealous spam filters.

And sorry to all of you that received some test emails...

I plan to write a blog post about how I replaced Revue with my custom-built solution.

Have a nice week β˜€οΈ


Vue Tip: Pass Custom Arguments to Event Handler Method

Watch on YouTube

In Vue, we use the v-on (typically shortened with the @ symbol) to listen to DOM events and run some JavaScript code when triggered.

We can use inline handlers or method handlers if the logic for the event handler is more complex:

<script setup>
const name = ref('Vue.js')
const greet = (event) => {
alert(`Hello ${name.value}!`)
if (event) {
alert(event.target.tagName)
}
}
</script>
<template>
<button @click="greet">Greet</button>
</template>

Sometimes we need to pass custom arguments to the method and access the original DOM event:

<script setup>
const name = ref('Vue.js')
const greet = (event, name) => {
alert(`Hello ${name.value}!`)
if (event) {
alert(event.target.tagName)
}
}
</script>
<template>
<button @click="greet($event, β€œMichael”)">Greet</button>
</template>

The original DOM event is accessible via the unique $event variable. Custom arguments can be added by calling the method in an inline handler instead of directly binding it to a method name.

Curated Vue Content

πŸ“• This is why you should be using Vue 3’s Composition API

πŸ‘‰πŸ» "Composition API is a valuable addition to the Vue ecosystem that offers improved code organization, improved performance, and the ability to easily reuse logic across multiple components"

medium.com
πŸ› οΈ PortalVue 3.0

πŸ‘‰πŸ» Feature-rich portal plugin for Vue 3.

πŸ‘‰πŸ» "A Portal Component for Vue 3, to render DOM outside of a component, anywhere in the document."

github.com
πŸ“† Vue.js Nation 2023

πŸ‘‰πŸ» It’s all happening 25 & 26 January

πŸ‘‰πŸ» Get to know Quasar, Vuetify 3, Nuxt 3, Pinia, Vite, Vitest, Volar, Vue.js, Typescript, VueUse and more!

πŸ‘‰πŸ» Evan You is hosting the keynote for Vue.js Nation.

πŸ‘‰πŸ» Register free!

vuejsnation.com
πŸ› οΈ neodrag

πŸ‘‰πŸ» This drag-and-drop solution includes packages for React, Svelte, Vue, Solid and vanilla JavaScript.

github.com

Quote of the week

Quote of the week

JavaScript Tip: A function that throws an error if a required parameter is missing

Watch on YouTube

Default function parametersΒ allow named parameters to be initialized with default values if no value orΒ undefinedΒ is passed.

We can use this approach to write a function that throws an error if a required parameter is missing:

const isRequired = () => {
throw new Error('Parameter is required!')
}
const foo = (bar = isRequired()) => {
console.log(bar)
}
foo() // throws the isRequired error
foo(undefined) // throws the isRequired error
foo(false) // logs "false"
foo(null) // logs "null"
foo('Test') // logs "true"

Curated Web Development Content

πŸ“Ή Learn JavaScript by coding your own card game

πŸ‘‰πŸ» Free 2 hour YouTube course.

πŸ‘‰πŸ» You'll use plain vanilla JavaScript to flip, shuffle, and deal cards from your deck.

www.freecodecamp.org
πŸ“• Super Useful CSS Resources

πŸ‘‰πŸ» A collection of 70 web-based tools that can generate pure CSS without the need for JavaScript or external libraries.

πŸ‘‰πŸ» Categories include property generators, animations, backgrounds, typography, loaders, and layouts.

dev.to
πŸ“• Git Notes: git's coolest, mostΒ unlovedΒ­Β feature

πŸ‘‰πŸ» Git notes allow developers to stow metadata about anything tracked by git without affecting the object itself.

tylercipriani.com
πŸ“• Why Birdie moved to Micro Frontends

πŸ‘‰πŸ» In this article, Steve from Birdie aims to break down what a micro frontend application is, why they moved to it, and what they’ve learned along the way.

medium.com
πŸ› οΈ Act

πŸ‘‰πŸ» It allows users to run GitHub Actions locally.

πŸ‘‰πŸ» It allows developers to receive fast feedback and features a local task runner.

πŸ‘‰πŸ» It is available on Windows, macOS, and Linux.

github.com
πŸ› οΈ commitgpt

πŸ‘‰πŸ» Automatically generate commit messages using ChatGPT.

github.com
Warning
Expect styling problems, as this issue was created using a different rendering mechanism.
Published at Dec 26, 2022, 2:00 PM
I will never share any of your personal data.

Hi πŸ‘‹

I deleted my account at Revue as they will shut down in January 2023.

This is the first issue that is sent via my custom-built newsletter solution:

I store the subscriber list on Supabase, manage the content as Markdown files on my Nuxt 3-powered newsletter website and send the emails using Amazon SES.

If you have any problems with this email, please email me! It's also possible to read it online.

Be sure to add newsletter@weekly-vue.news to your email contact list. Doing this protects against overzealous spam filters.

And sorry to all of you that received some test emails...

I plan to write a blog post about how I replaced Revue with my custom-built solution.

Have a nice week β˜€οΈ


Vue Tip: Pass Custom Arguments to Event Handler Method

Watch on YouTube

In Vue, we use the v-on (typically shortened with the @ symbol) to listen to DOM events and run some JavaScript code when triggered.

We can use inline handlers or method handlers if the logic for the event handler is more complex:

<script setup>
const name = ref('Vue.js')
const greet = (event) => {
alert(`Hello ${name.value}!`)
if (event) {
alert(event.target.tagName)
}
}
</script>
<template>
<button @click="greet">Greet</button>
</template>

Sometimes we need to pass custom arguments to the method and access the original DOM event:

<script setup>
const name = ref('Vue.js')
const greet = (event, name) => {
alert(`Hello ${name.value}!`)
if (event) {
alert(event.target.tagName)
}
}
</script>
<template>
<button @click="greet($event, β€œMichael”)">Greet</button>
</template>

The original DOM event is accessible via the unique $event variable. Custom arguments can be added by calling the method in an inline handler instead of directly binding it to a method name.

Curated Vue Content

πŸ“• This is why you should be using Vue 3’s Composition API

πŸ‘‰πŸ» "Composition API is a valuable addition to the Vue ecosystem that offers improved code organization, improved performance, and the ability to easily reuse logic across multiple components"

medium.com
πŸ› οΈ PortalVue 3.0

πŸ‘‰πŸ» Feature-rich portal plugin for Vue 3.

πŸ‘‰πŸ» "A Portal Component for Vue 3, to render DOM outside of a component, anywhere in the document."

github.com
πŸ“† Vue.js Nation 2023

πŸ‘‰πŸ» It’s all happening 25 & 26 January

πŸ‘‰πŸ» Get to know Quasar, Vuetify 3, Nuxt 3, Pinia, Vite, Vitest, Volar, Vue.js, Typescript, VueUse and more!

πŸ‘‰πŸ» Evan You is hosting the keynote for Vue.js Nation.

πŸ‘‰πŸ» Register free!

vuejsnation.com
πŸ› οΈ neodrag

πŸ‘‰πŸ» This drag-and-drop solution includes packages for React, Svelte, Vue, Solid and vanilla JavaScript.

github.com

Quote of the week

Quote of the week

JavaScript Tip: A function that throws an error if a required parameter is missing

Watch on YouTube

Default function parametersΒ allow named parameters to be initialized with default values if no value orΒ undefinedΒ is passed.

We can use this approach to write a function that throws an error if a required parameter is missing:

const isRequired = () => {
throw new Error('Parameter is required!')
}
const foo = (bar = isRequired()) => {
console.log(bar)
}
foo() // throws the isRequired error
foo(undefined) // throws the isRequired error
foo(false) // logs "false"
foo(null) // logs "null"
foo('Test') // logs "true"

Curated Web Development Content

πŸ“Ή Learn JavaScript by coding your own card game

πŸ‘‰πŸ» Free 2 hour YouTube course.

πŸ‘‰πŸ» You'll use plain vanilla JavaScript to flip, shuffle, and deal cards from your deck.

www.freecodecamp.org
πŸ“• Super Useful CSS Resources

πŸ‘‰πŸ» A collection of 70 web-based tools that can generate pure CSS without the need for JavaScript or external libraries.

πŸ‘‰πŸ» Categories include property generators, animations, backgrounds, typography, loaders, and layouts.

dev.to
πŸ“• Git Notes: git's coolest, mostΒ unlovedΒ­Β feature

πŸ‘‰πŸ» Git notes allow developers to stow metadata about anything tracked by git without affecting the object itself.

tylercipriani.com
πŸ“• Why Birdie moved to Micro Frontends

πŸ‘‰πŸ» In this article, Steve from Birdie aims to break down what a micro frontend application is, why they moved to it, and what they’ve learned along the way.

medium.com
πŸ› οΈ Act

πŸ‘‰πŸ» It allows users to run GitHub Actions locally.

πŸ‘‰πŸ» It allows developers to receive fast feedback and features a local task runner.

πŸ‘‰πŸ» It is available on Windows, macOS, and Linux.

github.com
πŸ› οΈ commitgpt

πŸ‘‰πŸ» Automatically generate commit messages using ChatGPT.

github.com
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.