Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48980

Ionic vue script setup props not being passed correctly

$
0
0

Hi. I am using Ionic 6 Vue 3 with the composition api and script setup and so I am passing a prop to a view using

router.push({ name: ‘Component’, params: { uuid:id } })

inside the script setup in the component I have

const props = defineProps({
uuid: String,
});

The problem is that props.uuid does not change after the component has been initially mounted. For example I navigate to the page passing a value then I leave the page but when I return passing a different value props.uuid has not changed.

I also tried this same thing using the “standard” composition api syntax and I encountered the same issue.

btw my code worked fine before I added Ionic to the project. This would be a bug with Ionic, am I wrong?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48980

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>