Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: πŸ› include React correctly
  • Loading branch information
streamich committed Jun 9, 2018
1 parent cab3f15 commit 36ed884
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/context/index.ts
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import faccToHoc from '../util/faccToHoc';

const contexts = {};
Expand All @@ -7,7 +7,7 @@ const getOrCreateContext = (name: string) => {
let context = contexts[name];

if (!context) {
context = contexts[name] = React.createContext();
context = contexts[name] = React.createContext({});
}

return context;
Expand Down Expand Up @@ -66,7 +66,7 @@ export class Consumer extends React.Component<IConsumerProps, IConsumerState> {
return null;
}

return React.createElement(context.Consumer, {}, this.props.children);
return React.createElement(context.Consumer, {}, children);
}
}

Expand Down

0 comments on commit 36ed884

Please sign in to comment.