Weekly Vue News

By Michael Hoffmann (Mokkapps)

Weekly Vue.js News - #46 - Use fallthrough attributes





Subscribe to our newsletter

By subscribing, you agree with Revue’s Terms of Service and Privacy Policy and understand that Weekly Vue News will receive your email address.

Michael Hoffmann (Mokkapps)
Michael Hoffmann (Mokkapps)
Hi 👋
In this issue, I have curated a few interesting articles and tweets to help you in your journey to become a Vue expert.
You’ll learn how to use fallthrough attributes in Vue and how to copy text to clipboard using the Clipboard API.
Have a great week ☀️

Vue Tip: Use fallthrough attributes
A “fallthrough attribute” is an attribute or v-on event listener that is passed to a component, but is not explicitly declared in the receiving component’s props or emits. Common examples of this include class, style, and id attributes.
For example, given a <MyButton> component with the following template:
And a parent using this component with:
The final rendered DOM would be:
If the child component’s root element already has existing class or style attributes, it will be merged with the class and style values that are inherited from the parent:
Then the final rendered DOM would now become:
Vue News
Michael Hoffmann
ℹ️ Vue 2.7 will be the final minor release of Vue 2.x and its estimated 'end of life' date will be at the end of 2023

https://t.co/z81LFsMx51 https://t.co/WH1ZHfH90m
📹 An Introduction to Vue.js State Management with Pinia
How to Create a Custom Code Block With Nuxt Content v2
JavaScript Tip: Write text to the system clipboard
Example cde for Clipboard API
Example cde for Clipboard API
The Clipboard API provides the ability to respond to clipboard commands (cut, copy, and paste) as well as to asynchronously read from and write to the system clipboard. Supported by all modern browsers.
A typical use case is a button to copy the code to the clipboard:
Copy code button in a code block component on the bottom right
Copy code button in a code block component on the bottom right
Web Development News
JavaScript Tip Collection
Michael Hoffmann
💡 Why every developer should be motivated to write tests:

👉🏻 They avoid regression

👉🏻 They can help to regularly and quickly check if all requirements are fulfilled

👉🏻 They can help to document the business logic in form of test cases

What do you think?
Anatomy of a JavaScript Framework
How we deploy to production over 100 times a day
Quote of the week
Tools & Misc
🛠️ AutoAnimate
🛠️ ugit
Did you enjoy this issue? Yes No
Michael Hoffmann (Mokkapps)
Michael Hoffmann (Mokkapps) @mokkapps

Hi 👋

My name is Michael Hoffmann and I'm a Senior Frontend Developer, Freelancer and Blogger.

I focus on Vue.js, JavaScript, TypeScript and Spring Boot. Occasionally I also give career & freelancer advice.

My weekly emails reflect this preference.

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