UNPKG

@nozbe/watermelondb

Version:

Build powerful React Native and React web apps that scale from hundreds to tens of thousands of records and remain fast

18 lines (15 loc) 371 B
// @flow const compose: any = (...funcs) => (Component) => { const enhance = funcs.reduce( (a, b) => (...args) => a(b(...args)), (arg) => arg, ) const EnhancedComponent = enhance(Component) EnhancedComponent.displayName = `${Component.name}.Enhanced` return EnhancedComponent } export default (compose: $Compose)