import * as React from 'react' ; import * as ReactDOM from 'react-dom' ; import { TodoApp } from './todoApp' ; import { TodoModel } from './core' ; import { Authenticator } from '@microsoft/office-js-helpers' ; var model = new TodoModel ( 'react-todos' ) ; function render ( ) { ReactDOM . render ( < TodoApp model = { model } / > , document . getElementsByClassName ( 'todoapp' ) [ 0 ] ) ; } /** initialize throws if called more than once and hence is wrapped in a try-catch to perform a safe initialization. */ try { microsoftTeams . initialize ( ) ; } catch ( e ) { } if ( ! Authenticator . isAuthDialog ( true ) ) { model . subscribe ( render ) ; render ( ) ; }