1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | 'use strict';
|
12 |
|
13 | var _assign = require('object-assign');
|
14 |
|
15 | var ReactComponent = require('./ReactComponent');
|
16 | var ReactNoopUpdateQueue = require('./ReactNoopUpdateQueue');
|
17 |
|
18 | var emptyObject = require('fbjs/lib/emptyObject');
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | function ReactPureComponent(props, context, updater) {
|
24 |
|
25 | this.props = props;
|
26 | this.context = context;
|
27 | this.refs = emptyObject;
|
28 |
|
29 |
|
30 | this.updater = updater || ReactNoopUpdateQueue;
|
31 | }
|
32 |
|
33 | function ComponentDummy() {}
|
34 | ComponentDummy.prototype = ReactComponent.prototype;
|
35 | ReactPureComponent.prototype = new ComponentDummy();
|
36 | ReactPureComponent.prototype.constructor = ReactPureComponent;
|
37 |
|
38 | _assign(ReactPureComponent.prototype, ReactComponent.prototype);
|
39 | ReactPureComponent.prototype.isPureReactComponent = true;
|
40 |
|
41 | module.exports = ReactPureComponent; |
\ | No newline at end of file |