Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support redux-persist-fs-storage (JS-Only) #6651

Closed
2 tasks
creambyemute opened this issue Dec 2, 2020 · 5 comments
Closed
2 tasks

Support redux-persist-fs-storage (JS-Only) #6651

creambyemute opened this issue Dec 2, 2020 · 5 comments
Assignees
Labels
enhancement Extensions Tracks issues against community modules and extensions
Milestone

Comments

@creambyemute
Copy link

creambyemute commented Dec 2, 2020

Support redux-persist-fs-storage on RNW

It's basically already done, JS-Changes review desired

It's a FSStorageAdapter acting like AsyncStorage (methods). It uses react-native-fs under the hood.

The only changes needed are in the index.js for Windows path compatibility anf fs-checks (like .exists before .mkdir). I've already done some and would like someone to quickly cross-check.

Have tested the changes on Windows & Android for now.

Basic Info

Which app/customer is requesting this module?

Community Module

In what scenarios will this module be used?

It allows to persist data to the FS with the usual AsyncStorage methods. Usually used together with apollo-cache-persist in React-Native (due to AsyncStorage size limit on Android).

Essential Features

  • setItem()
  • getItem()
  • removeItem()
  • getAllKeys()
@creambyemute creambyemute added Extensions Tracks issues against community modules and extensions enhancement labels Dec 2, 2020
@ghost ghost added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Dec 2, 2020
@chrisglein
Copy link
Member

@creambyemute If I understand correctly you mostly have this buttoned up and are looking for some additional eyeballs on it to help get it merged into the main repo for redux-persist-fs-storage? Let me know if I'm misunderstanding. We'd be happy to help!

@chrisglein chrisglein removed the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Dec 3, 2020
@chrisglein chrisglein added this to the Backlog milestone Dec 3, 2020
@creambyemute
Copy link
Author

creambyemute commented Dec 3, 2020

@chrisglein Yeah exactly. Mainly for some eyeballing over the JS as I had to add the OSPathSeperator and a .exist+.mkdir check before writing.

RN-FS which is used, is using avmoroz's Win10 C++ Implementation. He has a PR open on the main RN-FS repo for that.

@stmoy
Copy link
Contributor

stmoy commented Jan 9, 2021

@creambyemute - happy new year! Bubbling this up. It looks like @asklar added some comments on the PR that haven't yet been addressed. Is there more info that we need to provide?

@creambyemute
Copy link
Author

@stmoy I don't think so. I can't use NodeJS FS there. Seems like @asklar Approved these recently.

Not sure if it ever will get merged to either to original nor the @ConnectedHomes repository so I forked it and added it there. Seems to be working so far.

@creambyemute
Copy link
Author

Fork is available at: https://github.com/wwimmo/redux-persist-fs-storage

Original repo is unmaintained, the one where I create a PR seems to be unmaintained as well.

I've been using it since then and didn't have problems yet, so for me it's solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Extensions Tracks issues against community modules and extensions
Projects
None yet
Development

No branches or pull requests

3 participants