import React from 'react' ; import { Node } from '../../interfaces' ; import { useNode } from '../useNode' ; export function connectNode < C > ( collect ? ) { return function ( WrappedComponent ) { return ( props ) => { const node = useNode ( collect ) ; return < WrappedComponent { ... node } { ... props } />; } ; } ; }