import { REACT , COMPONENT , PROPS } from '../constants' ; import { EnhancerCombination } from './combineEnhancerResults' ; import { RenderTransform } from '../types' ; const DEFAULT = `${ REACT }.createElement(${ COMPONENT }, ${ PROPS })` ; export default ( results ) : string => { const statement = results . renderTransforms . reduce ( ( acc , transformRender ) => transformRender ( acc ) , DEFAULT ) ; return `return ${ statement };` ; } ;