-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathindex.js
35 lines (30 loc) · 788 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import {BaseMixin, PropsMixin} from './Mixin';
import {QueryRequest} from './QueryRequest';
import {MetaSession} from './Session';
import * as RethinkdbWebsocketClient from 'rethinkdb-websocket-client';
const r = RethinkdbWebsocketClient.rethinkdb;
const Session = MetaSession(RethinkdbWebsocketClient);
// Singleton session for convenience.
const DefaultSession = new Session();
// Singleton mixin for convenience, which uses the DefaultSession singleton as
// the session.
const DefaultMixin = BaseMixin(() => DefaultSession);
const ReactRethinkdb = {
BaseMixin,
PropsMixin,
QueryRequest,
r,
Session,
DefaultSession,
DefaultMixin
};
export {
BaseMixin,
PropsMixin,
QueryRequest,
r,
Session,
DefaultSession,
DefaultMixin,
ReactRethinkdb as default,
};