Skip to content

sjones6/gun-realm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gun-Realm

Store GunJS graph data in RealmJS for React Native apps.

WARNING: NOT PRODUCTION READY!

Motivation

In most apps, you will want to keep local state of your Gunjs data between application sessions and when offline. In the browser, Gun will dump to local storage to provide offline capabilities. This wires up your Gun database to a Realm store for fast local storage in your React Native application.

For an alternative with AsyncStorage, see Andre Staltz's gun-asyncstorage.

Installation

Clone this repo (eventually will be available on npm).

// Still working out bugs when loading Gun in React Native
import Gun from 'gun/gun';
import registerGunRealm from './gun-realm/register';
registerGunRealm(Gun);

let gun = new Gun();

Caution about Expo

Currently, Expo does not support Realm, but you can detach your app or use a simple react-native init type install. Eventually, support for Realm may be built in to Expo which will take away some of the manual steps required.

Issues

Issues welcome on Github.

About

A React Native RealmJS adapter for GunJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages