Skip to content

Instantly share code, notes, and snippets.

@gigobyte
Last active May 15, 2017 18:30
Show Gist options
  • Save gigobyte/b2c0451caa4a0af2602c5e511a87989b to your computer and use it in GitHub Desktop.
Save gigobyte/b2c0451caa4a0af2602c5e511a87989b to your computer and use it in GitHub Desktop.
import React from 'react'
const fetchResources = (mapResourcesToProps) => (ComposedComponent) => {
return class extends React.Component {
static displayName = `Fetch(${ComposedComponent.displayName || ComposedComponent.name})`
render() {
return <ComposedComponent {...this.props} />
}
}
}
export default fetchResources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment