import 'reflect-metadata' ; import * as ReactDOM from 'react-dom' ; import * as React from 'react' ; import { createComponent } from '../../src/index' ; import { view } from './TodoView' ; import { TodoViewModel } from './TodoViewModel' ; const TodoEditor = createComponent ( { displayName : 'TodoEditor' , view } ) ( TodoViewModel ) ; ReactDOM . render ( < TodoEditor user = "mattiamanzati" onTodoSaved = { ( ) => alert ( 'Todos saved!' ) } onTodoAdded = { ( todo ) => console . log ( 'New todo:' , todo ) } />, document.getElementById('app'));