Socket
Socket
Sign inDemoInstall

react-native-fh-sync

Package Overview
Dependencies
4
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-fh-sync

Client library for React Native to connect an app with a fh-sync server


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

RNSync

React Native library to synchronize with a fh-sync server

Required setup

To use the sync client you need a sync server setup first see https://github.com/feedhenry/fh-sync

import RNSync from 'react-native-fh-sync';

RNSync.init({
  datasetId: <your dataset id>,
  url: <your sync server url>
});

RNSync.notify((notification) => {
  var code = notification.code
  if('sync_complete' === code){
    //a sync loop completed successfully, list the update data
    RNSync.doList(this.messagesId,
      (res) => {
        
        ...

      },
      function (err) {
        
        ...

      });
  } else {
    //choose other notifications the app is interested in and provide callbacks
  }
});

const queryParams = {};
const metaData = {};
RNSync.manage(this.messagesId, {}, queryParams, metaData, () => {});

Example

You can find a sample app in the example folder

Keywords

FAQs

Last updated on 22 Jun 2017

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc