[Vuejs]-How to debug an imported reactive variable?

1👍

You might want to try Pinia. Pinia is the go-to store for Vue 3 projects. It is lightweight and also has no mutations.
Though an extra library might seem like an overkill for your small use case, the debugging it offers might be a compelling argument on its own.

If, for some reason, you want to avoid Pinia, you can implement your state as a composable and then destructure the desired variable from your state in your component’s script setup. Then it should be visible in Vue’s Dev Tools.

const { myVariable } = useMyState()

Leave a comment