
Company News
Socket Joins the OpenJS Foundation
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.
rn-persistor
Advanced tools
rn-persistor is a lightweight and efficient package that seamlessly integrates Realm into your React Native applications, providing a robust solution for persistent data storage. This package simplifies the integration process and allows developers to focus on building engaging user experiences
npm install rn-persistor
Install the realm dependency
npm install realm
import RealmStorage from 'rn-persistor';
const realmStorage = new RealmStorage();
// For persistance
const persister = createAsyncStoragePersister({
storage: realmStorage, // pass to your storage option
});
// For Data storage
async function test() {
const key = 'token';
await realmStorage.setItem(key, JSON.stringify('abcdefsdf54s5df4ds5f'));
const persistedData = await realmStorage.getItem(key);
await realmStorage.removeItem(key);
}
test();
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library
FAQs
A persistor package built from realm for react native applications.
The npm package rn-persistor receives a total of 4 weekly downloads. As such, rn-persistor popularity was classified as not popular.
We found that rn-persistor 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.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.