Skip to content

Instantly share code, notes, and snippets.

@antonycourtney
Last active October 19, 2015 02:36
Show Gist options
  • Save antonycourtney/48d94a00ceeb3e70662b to your computer and use it in GitHub Desktop.
Save antonycourtney/48d94a00ceeb3e70662b to your computer and use it in GitHub Desktop.
Top level View component for TodoMVC app
/**
* todoApp.React.js -- top-level React component for TodoMVC
*/
export default class TodoApp extends React.Component {
render() {
const appState = this.props.appState;
const allTodos = appState.getAll();
return (
<div>
<Header stateRefUpdater={this.props.stateRefUpdater} />
<MainSection
allTodos={allTodos}
areAllComplete={appState.areAllComplete()}
stateRefUpdater={this.props.stateRefUpdater}
/>
<Footer allTodos={allTodos} stateRefUpdater={this.props.stateRefUpdater} />
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment