rnr

rnrecord

A active record library for react native

Showing:

Popularity

Downloads/wk

23

GitHub Stars

2

Maintenance

Last Commit

5yrs ago

Contributors

1

Package

Dependencies

0

License

Apache-2.0

Type Definitions

Tree-Shakeable

No?

Categories

Readme

RnRecord

RnRecord is a active record library for react native.

Getting started

$ npm install rnrecord --save

Installation

$ react-native link rnrecord

For iOS it is additionally required to link libsqlite. In order to do that, open the project in xcode, click on the project in the project navigator, go to build phases -> link binary with libraries, click the + symbol, search for libsqlite3.tbd and choose that library.

Usage

import RnRecord from 'rnrecord';

class Person extends RnRecord {
  name: String;
  age: Number;

  constructor(name: String, age: Number) {
    super();
    this.name = name;
    this.age = age;
  }
}

const p = new Person("rob", 29);
p.save().then(id => {
  p.age = 30;
  p.update().then(res => {
    Person.find({age: 30}).then(r => console.log(r));
  });
});

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100