-3๐
โ
I found solution for my problem: https://pinia.vuejs.org/
Maybe someone will need this info.
Edit
You can use store to manage data across your application
๐คZaki
1๐
You probably should use emits to share the data from the child component to the parent. I have set up a Vue3 Composition API example. Check it out here:
Parent:
<template>
<Comp @send-data="callback" />
<input v-model="myInput" />
</template>
<script setup>
import { ref } from 'vue'
import Comp from './Comp.vue'
const myInput = ref('')
const callback = data => myInput.value = data
</script>
Child:
<template>
<button
@click="btnClicked()"
v-text="`Click to send data`"
/>
</template>
<script setup>
import { ref } from 'vue'
const emits = defineEmits(['sendData'])
const btnClicked = () => emits('sendData', 'some data')
</script>
* If you share some code, we can help you better and write better examples that get near what you want to achieve too.
๐คericmp
Source:stackexchange.com