1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 4x 45x | // @flow import React, { Component } from 'react'; import ContextTypes from '../types/context-types'; export default function ValidationComponentHOC(WrapperComponent: any) { return class ValidationComponentWrapper extends Component { static contextTypes = ContextTypes; render() { return <WrapperComponent {...this.context} {...this.props} />; } }; } |