question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does Hookstate/Persistance work on React Native ?

See original GitHub issue

I am about to start a new React Native project and I would like to know if the package @hookstate/persistance also works on React Native since there is no localStorage on Native devices.

If not, is there a possibility to make it work using for example the AsyncStorage on React Native ?

I am currently using this Package for my ReactJS Webapp and I find it very easy and great to use, so I would also use in for React Native.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
avkonstcommented, Aug 26, 2021

Hi, I do not think there is any other. However, I noticed over the course of 2 unrelated projects, that each project required unique things of the persistence layer, so custom plugins were more suitable. Persistence on mobile is quite hard as it requires storage upgrade to new versions, synchronization with cloud, etc… I guess advise at this stage is to put custom and specific to your project plugin (it is very easy overall). And if you find out that it can be generalized, then submit it back to the community. Makes sense?

0reactions
avkonstcommented, Aug 26, 2021

And the project you referred to is quite nice. I think it has got some good points in the API and plugable engine…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Localstored state - Hookstate
Simple extension which enables local storage persistence for a state. It works same way for local and global states; An application can provide...
Read more >
hookstate-persist - npm
Simple and configurable peristence plugin for Hookstate state management.. Latest version: 1.0.2, last published: 2 years ago.
Read more >
Simplify React state management with Hookstate
@hookstate/persistence enables us to persist our state to the browser's local storage, which is useful for offline apps or if you'd like a...
Read more >
peter-olom/hookstate-persist - GitHub
Hookstate Persist. Simple and configurable peristence plugin for Hookstate state management. Works on React Native and Web.
Read more >
Hookstate: Flexible state management for React(Native)
A killer feature from hookstate is the ability to subscribe only to portions ... Persist state on LocalStorage / AsyncStorage (React Native) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found