File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Section9-React-with-TypeScript/reminders-app/src Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 1- import React from 'react' ;
2- import logo from './logo.svg' ;
3- import './App.css' ;
4- import ReminderList from './components/ReminderList' ;
5- import Reminder from './models/reminder' ;
6-
7- const reminders : Reminder [ ] = [
8- { id :1 , title : 'Reminder 1' }
9- ]
1+ import React , { useState } from "react" ;
2+ import logo from "./logo.svg" ;
3+ import "./App.css" ;
4+ import ReminderList from "./components/ReminderList" ;
5+ import Reminder from "./models/reminder" ;
106
117
128function App ( ) {
9+ const [ reminders , setReminders ] = useState < Reminder [ ] > ( [
10+ { id : 1 , title : "Reminder 1" } ,
11+ ] ) ;
12+
1313 return (
1414 < div className = "App" >
15- < ReminderList items = { reminders } />
15+ < ReminderList items = { reminders } />
1616 </ div >
1717 ) ;
1818}
You can’t perform that action at this time.
0 commit comments