provide/inject — scoped state. Pinia — global state.
provide/inject:
Pinia:
1<!-- provide/inject -->2<script setup>3provide("theme", ref("dark"))4</script>56<!-- Pinia -->7<script setup>8import { useThemeStore } from "@/stores/theme"9const theme = useThemeStore()10</script>
Key: provide/inject for local, Pinia for global.