How to access useLocalStorage in Nuxt 3?

I know some Vue Use things come built-in like useHead and what not. But does it also come with useLocalStorage? If not, how to add it?
3 Replies
Lannister
Lannister5mo ago
VueUse has a composable called useLocalStorage https://vueuse.org/core/useLocalStorage/ naturally that will work client-side only check out this article too https://lk4real.medium.com/working-with-localstorage-in-nuxt-3-c27618ab89bd
Zack Plauché
Zack PlauchéOP5mo ago
Does that mean I need to install all of VueUse for this to work?
Lannister
Lannister5mo ago
no, its treeshakable, you import the composable you need, in a production build only that composable code will be used but you do need to install VueUse as a dependency in your project
Want results from more Discord servers?
Add your server