Category "vue-composition-api"

How can I use async/await in the Vue 3.0 setup() function using Typescript

(This question has been answered for JavaScript, see below, but this question is specific for TypeScript, which behaves differently) I'm trying to use async fun

How to toggle to dark mode in Vue JS and Tailwind CSS

I want to toggle to dark mode in Vue JS and Tailwind CSS with Dark class in tailwind, but I don't have idea what I should do. I code a little and I want to try

Vuetify search-input.sync for v-autocomplete inside v-for

I have a line_items array, iterated using v-for. For each of the line_item object, I need a v-autocomplete element that is used to search for category. Currentl

Vuetify search-input.sync for v-autocomplete inside v-for

I have a line_items array, iterated using v-for. For each of the line_item object, I need a v-autocomplete element that is used to search for category. Currentl

How to bind an empty array to the props in Vue.js3?

<script lang="ts" setup> interface Props { bigArray: string[]; } ***const props = withDefaults(defineProps<Props>(), { big

How to correctly declare static refs in Composition API using Typescript?

I am using the Composition API (with <script setup lang='ts'>) to create a ref, used in my template: const searchRef = ref(null) onMounted(() => { sear

Vue 3 Composition API: Update Child components props dynamically when values update from the parent component

I am trying to update a prop value when the data from the parent component gets updated and passes through the prop. The parent value always updates but does no

How to use TypeScript + Composition API + Vuex (namespaced)?

I'm currently trying to create a Vue 3 Application that utilizes the Composition API with Vuex 4 (namespaced) written in TypeScript. There are tons of different

vue3 performance warning using ref

vue is throwing this message: Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoid

How to use router in vue composition api?

I defined a route in vue: /users/:userId Which point to UserComponent: <template> <div>{{username}}</div> </template> and I use

Is it possible to turn that into '<script setup>' ? I try many ways but missing something maybe

Is it possible to turn that into <script setup> ? I try many ways but missing something maybe. Need help ! <script> import ProductsAPI from '../