Closed syukriyansyah-ipb closed 2 years ago
It's similar to https://github.com/iendeavor/pinia-plugin-persistedstate-2/tree/main/examples/nuxt-bridge-example:
import cookie from 'js-cookie' const persistedStatePlugin = createPersistedStatePlugin({ storage: { getItem: async (key) => { return cookie.get(key) }, setItem: async (key, value) => { cookie.set(key, value) }, removeItem: async (key) => { return cookie.remove(key) }, }, }) // ...
https://github.com/iendeavor/pinia-plugin-persistedstate-2#storage
It's similar to https://github.com/iendeavor/pinia-plugin-persistedstate-2/tree/main/examples/nuxt-bridge-example:
https://github.com/iendeavor/pinia-plugin-persistedstate-2#storage