realm-react
A higher-order component for listening to Realm data in React components.
Usage
// the file you use to wire up your realm schemas, etc.; ...// render function of your top level component for your app { <RealmProvider realm=realm> <MyComponent /> </RealmProvider>}...
; { const realm = thisprops; realm; }; { <PeopleList people=thispropspeople /> } MyComponent schemas: 'Person' { // the object that is returned from the mapToProps function // will be merged into the components props return realm // property on the results argument is the camel-cased and // pluralized version of the schema name, so... // instead of person being the property we get people people: resultspeople ; };
Examples
Check out the example react native app to see realm-react in use.