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

async storage community to react native async storage #203

Open
anisamh18 opened this issue Apr 25, 2022 · 2 comments
Open

async storage community to react native async storage #203

anisamh18 opened this issue Apr 25, 2022 · 2 comments

Comments

@anisamh18
Copy link

Is there any solution to replace the community async storage in dependencies, this is causing a conflict, since community async storage is deprecated now

@rossb89
Copy link

rossb89 commented Jun 15, 2022

So this package needs a new release that changes to use the newer @react-native-async-storage/async-storage instead of @react-native-community/async-storage in a few places.

Presuming you are already specifying e.g. "@react-native-async-storage/async-storage": "~1.15.0", as a dependency of your project you can do the following...

Use https://www.npmjs.com/package/patch-package to create a patch locally by modifying the following files under node_modules/@haskkor/react-native-pincode/:

  • /dist/index.js
  • /dist/src/ApplicationLocked.js
  • /dist/src/PinCodeEnter.js
  • /dist/src/utils.js

swapping out:
const async_storage_1 = require("@react-native-community/async-storage"); for
const async_storage_1 = require("@react-native-async-storage/async-storage");

and

  • /index.tsx

import AsyncStorage from '@react-native-community/async-storage' for
import AsyncStorage from '@react-native-async-storage/async-storage'

But yes, a new version of this package needs to be build by the maintainer with those changes in, including swapping out the dependency in it's package.json.

@fukemy
Copy link

fukemy commented Jan 11, 2024

any patched?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants