UNPKG

react-livr-validation

Version:

react validation component with LIVR as validation engine

15 lines (11 loc) 398 B
// @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} />; } }; }