-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.js
48 lines (40 loc) · 1.25 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
'use strict';
var React = require('react');
var Router = require('fission-router');
var update = require('react/lib/update');
var component = require('./lib/renderables/component');
var view = require('./lib/renderables/view');
var modelView = require('./lib/renderables/modelView');
var collectionView = require('./lib/renderables/collectionView');
var model = require('./lib/data/model');
var collection = require('./lib/data/collection');
var classNames = require('classnames');
var ReactUpdates = require('react/lib/ReactUpdates');
var RAFBatch = require('./lib/util/RAFBatching');
ReactUpdates.injection.injectBatchingStrategy(RAFBatch);
module.exports = {
router: Router,
// renderables
component: component,
view: view,
modelView: modelView,
collectionView: collectionView,
DOM: React.DOM,
// data stuff
model: model,
collection: collection,
// move some react-router stuff up
ChildView: Router.ChildView,
Link: Router.Link,
// some utils
classes: classNames,
update: update,
// expose underlying react stuff
React: React,
createElement: React.createElement,
createFactory: React.createFactory,
PropTypes: React.PropTypes,
render: React.render,
renderToString: React.renderToStaticMarkup,
withContext: React.withContext
};