diff --git a/src/index.tsx b/src/index.tsx index f82c1df..66d9059 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -11,7 +11,7 @@ class AppState { constructor() { setInterval(() => { - appState.timer += 1; + this.timer += 1; }, 1000); } @@ -39,4 +39,4 @@ class TimerView extends React.Component<{appState: AppState}, {}> { }; const appState = new AppState(); -ReactDOM.render(, document.getElementById('root')); \ No newline at end of file +ReactDOM.render(, document.getElementById('root'));