Skip to content

Instantly share code, notes, and snippets.

@antonycourtney
Last active October 19, 2015 02:43
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 antonycourtney/1f075ad242a8858e08eb to your computer and use it in GitHub Desktop.
Save antonycourtney/1f075ad242a8858e08eb to your computer and use it in GitHub Desktop.
Top level of React application
/**
* app.js -- top level of TodoMVC app
*/
import React from 'react';
import OneRef from 'oneref';
import TodoAppState from './todoAppState';
import TodoApp from './components/TodoApp.react';
const todoAppState = new TodoAppState();
const stateRef = new OneRef.Ref(todoAppState);
React.render(
<OneRef.AppContainer appClass={TodoApp} stateRef={stateRef} />,
document.getElementById('todoapp')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment