Created
July 26, 2017 08:32
-
-
Save fasterthanlime/c80563ae3366ced368f3645ec99f9fba 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
// before | |
const Component = require("./component"); | |
class Container { | |
render() { | |
return <Component/>; | |
} | |
} | |
// after | |
const GetComponent = () => require("./component"); | |
class Container { | |
render() { | |
const Component = GetComponent(); | |
return <Component/>; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment