mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
Merge pull request #24 from B3zo0/patch-1
docs: typo in step1-07 readme
This commit is contained in:
@@ -28,7 +28,7 @@ Let's start off in the TodoList, as that has the most data flow, up and down. Th
|
|||||||
|
|
||||||
### Writing TodoListProps
|
### Writing TodoListProps
|
||||||
|
|
||||||
Looking at our `TodoApp` we know that `TodoList` has three props, `filter`, `todos`, and `filter`. We'll start by creating and interface that represents this component's props called `TodoListProps`.
|
Looking at our `TodoApp` we know that `TodoList` has three props, `filter`, `todos`, and `complete`. We'll start by creating an interface that represents this component's props called `TodoListProps`.
|
||||||
|
|
||||||
```tsx
|
```tsx
|
||||||
interface TodoListProps {
|
interface TodoListProps {
|
||||||
@@ -141,7 +141,7 @@ export class TodoApp extends React.Component<{}, { todos: Todos; filter: FilterT
|
|||||||
|
|
||||||
### Writing TodoListItemProps
|
### Writing TodoListItemProps
|
||||||
|
|
||||||
Jumping down to the TodoListItem, as we start to write the TodoListItemProps we realize that two of the props, `label` and `completed` have already been defined in the `TodoItem` interface in `TodoApp.types`. So in the same way we can reuse individual types (`FilterTypes`), we can reuse, and extend upon entire interfaces.
|
Jumping down to the TodoListItem, as we start to write the TodoListItemProps we realize that two of the props, `label` and `completed` have already been defined in the `TodoItem` interface in `TodoApp.types`. So in the same way we can reuse individual types (`FilterTypes`), and extend upon entire interfaces.
|
||||||
|
|
||||||
```tsx
|
```tsx
|
||||||
interface TodoListItemProps extends TodoItem {
|
interface TodoListItemProps extends TodoItem {
|
||||||
|
|||||||
Reference in New Issue
Block a user