Last active
May 15, 2017 18:30
-
-
Save gigobyte/b2c0451caa4a0af2602c5e511a87989b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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