I have setup two components parent and child: App.vue //Parent BookForm.vue //child I’ve followed this thread from vue forum for the solution but I cannot retrieve data from child component into parent component. When I console log console.log(bookRef.value) I get undefined. What is the correct way to get child component’s data with typescript and composition api setup tag ? Answer
Tag: vue-composition-api
How can i pull form values to another page
How can I get the email address entered while registering to this next page? If the query method is appropriate, it is my preference. I want to pull the e-mail address I entered on the signUp page to the verify Code page. VerifyCode.vue SignUp.vue Answer As @kissu, mentioned On SignUp page, you can use $router to route to the verifyCode
Deleting an array item in Composition API
I am trying to learn composition API and move away from options api as vue3 seems to be moving towards it. I am doing a simple example where a user enters in an input box the ticker and then the number of shares in the input box next to it. When you click off it adds it to the array
Passing element to composable function in Vue composition API?
I’ll preface this question by saying I’m very new to the composition API so I’m still trying to figure out the best practices. I’m writing a useResizeObserver composable function using Vue’s composition API in order to track dimension changes on a target element. Because I have to wait for the element to be mounted, I can’t call my composable from
How should a user be redirected to another page after successful login in Vue 3
In a vue 3 application that uses composition api, I want to do one of 2 things based on if an authenticated user is verified or not. So if the user is not verified, send the user to the verification page. But if the user is verified, send the user to the dashboard. To achieve this, I am using navigation
Vue 3 Composition API ref primitive property not reactive
So while building a tab system I’m taking advantage of useSlots and props in order to create an array of titles (these are the titles of every tab that I open in my tab system), then I create a ref property called selectedTitle in order to bind that title to a class and add css to highlight the tab selected
Why won’t my async call fire inside this Vue 3 component (using composition API)?
I’m trying to make an async call to fetch data from my Fauna database. But I can’t get the async call to fire. Inside the setup() function I have console.log(“Setup is working”); and that works as expected. It shows on page load. Then inside the callApi async function I have console.log(“callApi is working”);. That async function is called on a
How Do I Use an Import Function in a Vue 3 Template?
In a Vue 3 project, I have the following setup. There is a separate stuff.ts file with some helper functions in it and I want to use it in my template. As far as I can tell, the function is properly imported and it’s defined when I log it in onMounted(). But when I click the link and try to
trigger watch function in Vue 3 composition Api
I have set this reactive value inside the setup const refValue = ref(‘foo’); and set a watch function to it the watch function gets not activated if I manually change the value, it gets only activated if a add a function which changes the value why does watch only gets triggered when using a function to change the value, I
Vue 3 Composition API: using props as initial value for component data
So I am building a search page in Vue 3 using the composition API. I have a component which takes a set of data from the parent and shows a snippet of the data including where the keyword is, and so it needs to make a working copy of this data to make a displayable value. I had a lot