Skip to content

Instantly share code, notes, and snippets.

@alexnm
Created March 25, 2018 16:45
Show Gist options
  • Save alexnm/66c178260144ca138822862f39eab475 to your computer and use it in GitHub Desktop.
Save alexnm/66c178260144ca138822862f39eab475 to your computer and use it in GitHub Desktop.
Static declaration of data requirements
/* ... */
import { fetchData } from "../store";
class Home extends React.Component {
/* ... */
render( ) {
const { circuits } = this.props;
return (
/* ... */
);
}
}
Home.serverFetch = fetchData; // static declaration of data requirements
/* ... */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment