🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-native-sync

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-sync

Two way, incremental sync between React Native realmjs database and MySQL, Oracle, MS SQL Server and PostgreSQL

1.0.3
Source
npm
Version published
Weekly downloads
3
-81.25%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-sync

Two way, incremental sync between React Native realmjs database and MySQL, Oracle, MS SQL Server and PostgreSQL

Features

  • Direct DB synchronization between on device realmjs DB and server side MySQL, Oracle, MS SQL Server and PostgreSQL databases
  • Each user could subscribe to a subset of server side data
  • Files can also be syned

Demo

Check out react-native-sync-demo.

Setup

This library is available on npm, install it with: npm install --save react-native-sync or yarn add react-native-sync.

Usage

  • Import react-native-sync as RNSync:
import RNSync from "react-native-sync";
  • Configure RNSync:
var settings = {
    syncServerUrl: "http://localhost:8080/pervasync/server", // required
    syncUserName: "user_1", // required
    syncUserPassword: "welcome1", // required
};
await RNSync.config(settings);
  • Start a sync session:
let syncSummary = await RNSync.sync();
  • Get a handle to the synced realm database and synced folder path:
let realm = await RNSync.getRealm(syncSchemaName);
let path = await RNSync.getPath(syncFolderName);

Complete Example

Check out react-native-sync-demo ans expecially sync.js

Keywords

React Native

FAQs

Package last updated on 21 Mar 2018

Did you know?

Socket

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.

Install

Related posts