diff --git a/topic-4/book-1/04.Favorites.md b/topic-4/book-1/04.Favorites.md index c5e0ff5..ec99c5f 100644 --- a/topic-4/book-1/04.Favorites.md +++ b/topic-4/book-1/04.Favorites.md @@ -91,8 +91,8 @@ const MovieCard: React.FC = ({movie, selectFavourite}) => { ~~~ + In the same file, replace the lines: ~~~tsx - - + + ~~~ with this: @@ -126,7 +126,7 @@ with this: } /> ~~~ -Until now, a component prop is either a data object or a callback functions. However, in the last excerpt above, a component is the value assigned to the title and avatar props. This is acceptable because a component transpiles to a function. Later we will develop custom components that accept other components as props. +Until now, a component prop is either a data object or a callback function. However, in the last excerpt above, a component is the value assigned to the title and avatar props. This is acceptable because a component transpiles to a function. Later we will develop custom components that accept other components as props. The above changes cause the following runtime execution flow: 1. On the Home page, the user clicks a movie card's Favourite icon. @@ -181,7 +181,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render( , -) +); ~~~ We must restart the development server whenever we nake routing configuration changes: @@ -200,9 +200,9 @@ The app has a bug! Try the following sequence: Commit this work to the repository: ~~~ -$ git add -A -$ git commit -m "Add to favourites logic completed; Dummy favourites page." -$ git push origin main +git add -A +git commit -m "Add to favourites logic completed; Dummy favourites page." +git push origin main ~~~ [navigation]: ./img/navigation.png