0👍
✅
you can store it as a variable
<template>
<SearchBar @emitTermSearch="onTermSearch"></SearchBar>
{{searchVal}}
</template>
<script>
import SearchBar from "./components/SearchBar";
export default {
name: "App",
components: {
SearchBar
},
data():{
return{
searchVal: null
}
},
methods: {
onTermSearch(emitTermSearch) {
this.searchVal = emitTermSearch;
}
}
};
</script>
Source:stackexchange.com