Skip to content

Commit 08aa209

Browse files
committed
Removes unused code.
1 parent 9e1eb63 commit 08aa209

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

src/AsyncComponentProvider.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ class AsyncComponentProvider extends React.Component {
2525
this.id += 1;
2626
return this.id;
2727
},
28-
registerComponent: (id, Component) => {
29-
this.props.execContext.registerComponent(id, Component);
30-
},
3128
getComponent: id => this.props.execContext.getComponent(id),
3229
},
3330
};
@@ -41,15 +38,13 @@ class AsyncComponentProvider extends React.Component {
4138
AsyncComponentProvider.propTypes = {
4239
children: React.PropTypes.node.isRequired,
4340
execContext: React.PropTypes.shape({
44-
registerComponent: React.PropTypes.func.isRequired,
4541
getComponent: React.PropTypes.func.isRequired,
4642
}).isRequired,
4743
};
4844

4945
AsyncComponentProvider.childContextTypes = {
5046
asyncComponents: React.PropTypes.shape({
5147
nextId: React.PropTypes.func.isRequired,
52-
registerComponent: React.PropTypes.func.isRequired,
5348
getComponent: React.PropTypes.func.isRequired,
5449
}).isRequired,
5550
};

src/createAsyncComponent.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ function createAsyncComponent(args) {
6565
resolveComponent() {
6666
return getResolver().then(Component =>
6767
this.setState({
68-
Component: es6Aware
69-
? es6Resolve(Component)
70-
: Component,
68+
Component: es6Resolve(Component),
7169
}),
7270
);
7371
}
@@ -86,7 +84,6 @@ function createAsyncComponent(args) {
8684
AsyncComponent.contextTypes = {
8785
asyncComponents: React.PropTypes.shape({
8886
nextId: React.PropTypes.func.isRequired,
89-
registerComponent: React.PropTypes.func.isRequired,
9087
getComponent: React.PropTypes.func.isRequired,
9188
}),
9289
};

src/types.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export type ExecContext = {
1414
export type ProviderChildContext = {
1515
asyncComponents: {
1616
nextId : () => number,
17-
registerComponent : (number, Function) => void,
1817
getComponent : (number) => ?Function,
1918
}
2019
};

0 commit comments

Comments
 (0)