@wordpress/compose
Version:
WordPress higher-order components (HOCs).
15 lines (13 loc) • 445 B
JavaScript
/**
* External dependencies
*/
import { flowRight as compose } from 'lodash';
/**
* Composes multiple higher-order components into a single higher-order component. Performs right-to-left function
* composition, where each successive invocation is supplied the return value of the previous.
*
* @param {...Function} hocs The HOC functions to invoke.
*
* @return {Function} Returns the new composite function.
*/
export default compose;