
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@effector-storage/react-native-encrypted-storage
Advanced tools
Module for Effector to sync stores with ReactNative EncryptedStorage
Adapter to persist store using React Native EncryptedStorage.
@effector-storage/react-native-encrypted-storage
has dependency on react-native-encrypted-storage
, so it will auto install it.
But depending on your platform and React Native version, you might want to install EncryptedStorage manually, because it might require linking.
So, install EncryptedStorage, following documentation for your platform.
Depending on your package manager
# using `pnpm` ↓
$ pnpm add effector-storage @effector-storage/react-native-encrypted-storage
# using `yarn` ↓
$ yarn add effector-storage @effector-storage/react-native-encrypted-storage
# using `npm` ↓
$ npm install --save effector-storage @effector-storage/react-native-encrypted-storage
Import persist
function from '@effector-storage/react-native-encrypted-storage'
module, and it will just work:
import { persist } from '@effector-storage/react-native-encrypted-storage'
// persist store `$counter` with key 'counter'
persist({ store: $counter, key: 'counter' })
// if your storage has a name, you can omit `key` field
persist({ store: $counter })
⚠️ Note, that EncryptedStorage is asynchronous.
Two (or more) different stores, persisted with the same key, will be synchronized (synchronously!), even if not connected with each other directly — each store will receive updates from another one.
import { persist } from '@effector-storage/react-native-encrypted-storage'
persist({ store, ...options }): Subscription
persist({ source, target, ...options }): Subscription
effector-storage
's persist
function.serialize
? ((value: any) => string): Custom serialize function. Default = JSON.stringify
.deserialize
? ((value: string) => any): Custom deserialize function. Default = JSON.parse
.import { adapter } from '@effector-storage/react-native-encrypted-storage'
adapter(options?): StorageAdapter
serialize
? ((value: any) => string): Custom serialize function. Default = JSON.stringify
.deserialize
? ((value: string) => any): Custom deserialize function. Default = JSON.parse
.Options serialize
and deserialize
are got you covered. But make sure, that serialization is stable, meaning, that deserialize(serialize(object))
is equal to object
(or serialize(deserialize(serialize(object))) === serialize(object)
):
import { persist } from '@effector-storage/react-native-encrypted-storage'
const $date = createStore(new Date(), { name: 'date' })
persist({
store: $date,
serialize: (date) => String(date.getTime()),
deserialize: (timestamp) => new Date(Number(timestamp)),
})
FAQs
Module for Effector to sync stores with ReactNative EncryptedStorage
We found that @effector-storage/react-native-encrypted-storage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.