pinia-plugin-persistedstate
vueuse
pinia-plugin-persistedstate | vueuse | |
---|---|---|
8 | 86 | |
1,799 | 18,761 | |
- | 1.2% | |
6.9 | 9.5 | |
25 days ago | 4 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pinia-plugin-persistedstate
-
Any advise when starting jumping in Vuex
If you use a standard Pinia store, you can use plug-ins. For example, you can use pinia-plugin-persistedstate to let the user start each new session where they left off. Or you can use pinia-orm to simplify handling large amounts of tabular data.
-
Is there a way to use $subscribe from Pinia in Nuxt 2 using Options API?
How about this plugin, then?: https://github.com/prazdevs/pinia-plugin-persistedstate.
-
What's your approach for choosing whether to make new child components "smart" or "dumb"? [example scenario inside]
When your application starts, fill your Pinia/Vuex store with data from the user's previous session. This is done automatically by pinia-plugin-persistedstate or the Vuex equivalent.
-
What are some of the best/most useful Vue libraries you've used?
pinia-plugin-persistedstate: keeps your Pinia store synced with the user's browser localStorage. In other words, if your user closes their browser and then returns to your Vue app later, they will have the same state as when they left.
-
Drag and drop
You also mentioned that the positions should be stored in localStorage. I would store the positions in Pinia, and then add the pinia-plugin-persistedstate plug-in. It's one import statement and one line of code to add that plugin, and then your Pinia state is automatically persisted in localStorage. It beats having to write and troubleshoot the storage logic yourself.
-
How do you persist Pinia state across reloads
I've used the pinia-plugin-persistedstate package and has worked fine for me.
-
Why won't my Vue 3 Pinia store persist state even with the Pinia Persisted State plugin?
I have a Vue 3 / TypeScript app that uses a combination of Firebase, Pinia, Vue Concurrency, and the Pinia Persisted State Plugin.
vueuse
-
Ask HN: Learn React or Vue?
My opinion: Vue, specifically the Vue 3 Composition API. Most of your app state should come from computed() values. Bookmark https://vueuse.org and come back to it often. Go through VueUse's source (the docs for each function link to their source): you'll be surprised at how simple most of it is, and it stands as documentation of best practices for using the composition API in general.
- Useful Vue Utils with VueUse
-
Implementing Tailwind CSS Dark Mode Toggle with No Flicker
Now, letโs talk about Vue! Once again, weโll use an external library to handle dark mode simply and quickly. In this case, the library is called VueUse, and you can install it using the command npm i @vueuse/core --save.
-
useHooks โ A collection of Server Component safe React Hooks
Great library. Could use some improvements as said by other (tree shaking, add jsdocs, etcโฆ). Just a quick reminder for the vuejs devs out there we have https://vueuse.org/
-
UseHooks โ A Collection of Server Component Safe React Hooks
Yeah, I figured useHooks was created without knowing about VueUse, but thought they might have become aware of it sense then. It makes sense, because though the code is heading in the direction of VueUse in terms of being maintained and well rounded, the structure of useHooks is quite a bit different. It has the code alongside the Markdown: https://github.com/vueuse/vueuse/tree/main/packages/integrat...
- VueUse Full Screen issue
-
Sending notifications to the browser from Vue?
Demo: https://github.com/vueuse/vueuse/blob/main/packages/core/useWebNotification/demo.vue
-
First Time at Vue
Also take a look at https://vueuse.org/ which might save you some lines :)
- Composition API vs. Options API
-
Why isnโt everyone using <script setup>?
For what it's worth my timeframe is very similar to yours! Started in 2019, no React / Angular. I think looking at great codebases like [VueUse](https://github.com/vueuse/vueuse) shows off the best of composition API.
What are some alternatives?
quasar-pinia-persistedstate
svelte-actions - prototype official actions for Svelte
localForage - ๐พ Offline storage, improved. Wraps IndexedDB, WebSQL, or localStorage using a simple but powerful API.
vue-composable - Vue composition-api composable components. i18n, validation, pagination, fetch, etc. +50 different composables
pinia-shared-state - ๐ Sync your Pinia state across browser tabs.
react-select - The Select Component for React.js
vue-supabase-tpa-demo - Third-Party Authentication (Github) demo Vue 3 + TypeScript + Pinia app using Supabase
vuex - ๐๏ธ Centralized State Management for Vue.js.
vue-good-table - An easy to use powerful data table for vuejs with advanced customizations including sorting, column filtering, pagination, grouping etc
vitesse - ๐ Opinionated Vite + Vue Starter Template
pinia-plugin-persistedstate-2 - [no longer maintained] Please use https://github.com/prazdevs/pinia-plugin-persistedstate instead.
Quasar Framework - Quasar Framework - Build high-performance VueJS user interfaces in record time