Skip to content

Instantly share code, notes, and snippets.

@fasterthanlime
Created July 26, 2017 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fasterthanlime/c80563ae3366ced368f3645ec99f9fba to your computer and use it in GitHub Desktop.
Save fasterthanlime/c80563ae3366ced368f3645ec99f9fba to your computer and use it in GitHub Desktop.
// 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