text: import React from 'react';
  import PropTypes from 'prop-types';
  import { Provider as ReduxProvider } from 'react-redux';
  
  const ContextType = {
    // Enables critical path CSS rendering
    insertCss: PropTypes.func.isRequired,
    // Universal HTTP client
    fetch: PropTypes.func.isRequired,
    pathname: PropTypes.string.isRequired,
    query: PropTypes.object,
    // Integrate Redux
    // http://redux.js.org/docs/basics/UsageWithReact.html
    ...ReduxProvider.childContextTypes,
  };
  
  class App extends React.PureComponent {
    static propTypes = {
      context: PropTypes.shape(ContextType).isRequired,
      children: PropTypes.element.isRequired,
    };
  
    static childContextTypes = ContextType;
  
    getChildContext() {
      return this.props.context;
    }
  
    render() {
      return React.Children.only(this.props.children);
    }
  }
  
  export default App;
  