I have a route with dynamic id, for example post/:postId and composable function which contains a lot of methods and functions.
when I go from route post/1 to post/2 composable doesn't updated and I got info for the id 1
How to force reinit of the composable function?
<script>
import postFunctions from '~/composable/postHelpers';
import { useContext } from '@nuxtjs/composition-api';
setup() {
const { store, params } = useContext();
const { postComments, updatePostText } = postFunctions(params.value.postId)
}
I used a key in the nuxt-child property and components rerenders full now