Seb-L / pinia-plugin-persist

Persist pinia state data in sessionStorage or other storages.
https://Seb-L.github.io/pinia-plugin-persist/
MIT License
214 stars 37 forks source link

fix: resolve sessionStorage is not defined in some platforms #43

Open PentaTea opened 2 years ago

PentaTea commented 2 years ago

In some platforms, sessionStorage does not exist

image image
Allen-1998 commented 2 years ago

I guess you encountered this problem when using uniApp. I had the same problem before and created pinia-plugin-persist-uni based on this project to solve the problem.

It seems that your approach is not quite the same as mine, but you can refer to it.

docs

Allen-1998 commented 2 years ago

I guess you encountered this problem when using uniApp. I had the same problem before and created pinia-plugin-persist-uni based on this project to solve the problem.

It seems that your approach is not quite the same as mine, but you can refer to it.

docs

codingcn commented 2 years ago

我猜你在使用 uniApp 时遇到了这个问题。我之前也遇到过同样的问题, 基于这个项目创建了pinia-plugin-persist-uni来解决这个问题。

看来你的做法和我的不太一样,不过可以参考一下。

文档

I guess you encountered this problem when using uniApp. I had the same problem before and created pinia-plugin-persist-uni based on this project to solve the problem.

It seems that your approach is not quite the same as mine, but you can refer to it.

docs

nice!