As a newcomer to the Vue Composition API, I've run into some issues with functions like defineProps not being available. My current predicament involves receiving props from a parent component and wanting to store them in the "Pinia" storage after a series of calculations. Can anyone provide guidance on how to achieve this?
export default defineComponent({
props: ['props'],
setup() {
const errorsStore = useErrorsStore();
onMounted(() => {
const processProps = (props) => {
console.log(props);
errorsStore.List.unshift(props);
setInterval(processProps, 10000)
}
processProps(props);
});
return {
errorsStore,
};
},
});
Your assistance on this matter would be greatly appreciated.