From 44459e39c3526673ac2ac7065c5659e4af5ea7d8 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 18 Nov 2017 22:02:44 +0900 Subject: use preact --- src/shared/store/provider.jsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/shared/store/provider.jsx') diff --git a/src/shared/store/provider.jsx b/src/shared/store/provider.jsx index 743f656..fe925aa 100644 --- a/src/shared/store/provider.jsx +++ b/src/shared/store/provider.jsx @@ -1,18 +1,15 @@ -import React from 'react'; -import PropTypes from 'prop-types'; +import { h, Component } from 'preact'; -class Provider extends React.PureComponent { +class Provider extends Component { getChildContext() { return { store: this.props.store }; } render() { - return React.Children.only(this.props.children); + return
+ { this.props.children } +
; } } -Provider.childContextTypes = { - store: PropTypes.any, -}; - export default Provider; -- cgit v1.2.3