Weekly Vue News

By Michael Hoffmann (Mokkapps)

Weekly Vue.js News - #41 - Define component name with <script setup>





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 👋
This week’s Vue tip is about defining the component name with the <script setup> syntax.
The Vue tips in this newsletter will from now on include more details inside the newsletter, to provide more value for you.
Additionally, I started writing an eBook called “27 helpful tips for Vue developers”. Stay tuned, it will be released soon.
I hope you will enjoy this weeks’ issue and if you have any feedback, please get in touch with me on Twitter - @mokkapps or via email.
Have a great week ☀️

Vue Tip: Define component name with <script setup>
If you are using the new <script setup> syntax, you may run into a case where you need some Options API functionality.
In this case, it’s possible to add an additional <script> block to your component. Vue will mix the two together for you, so the Composition API code and Options API code can remain separate.
A typical use case is to the define the name of the component:
Vue News
Vue 3 Reactivity System Is Brilliant! Here’s How It Works
How to add a Typewriter animation in Vue
JavaScript Tip
Michael Hoffmann
💡 JavaScript Tip:

Create a deep copy of an object using structuredClone

https://t.co/uAFJ52ofbF https://t.co/y56l85tG10
Web Development News
📹 What key was pressed? (You won't believe how keyboard events work)
📹 TypeScript tips and Tricks with Matt
Quote of the week
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