View profile

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

Michael Hoffmann
Michael Hoffmann
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
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
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