parent
89c52173ce
commit
44459e39c3
5 changed files with 12 additions and 19 deletions
@ -1,18 +1,15 @@ |
|||||||
import React from 'react'; |
import { h, Component } from 'preact'; |
||||||
import PropTypes from 'prop-types'; |
|
||||||
|
|
||||||
class Provider extends React.PureComponent { |
class Provider extends Component { |
||||||
getChildContext() { |
getChildContext() { |
||||||
return { store: this.props.store }; |
return { store: this.props.store }; |
||||||
} |
} |
||||||
|
|
||||||
render() { |
render() { |
||||||
return React.Children.only(this.props.children); |
return <div> |
||||||
|
{ this.props.children } |
||||||
|
</div>; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
Provider.childContextTypes = { |
|
||||||
store: PropTypes.any, |
|
||||||
}; |
|
||||||
|
|
||||||
export default Provider; |
export default Provider; |
||||||
|
Reference in new issue