Skip to content

Commit

Permalink
Tweak a link and a typo (#3)
Browse files Browse the repository at this point in the history
* Fix link for users NOT using localhost:3000

Using a relative link is safer here; some students (err... me 😅) might
be using another port or another platform entirely (like Gitpod) where
localhost isn't available like that.

* Grammar nitpick; plural for "user" is "users"

D'oh. I wasn't going to do this, but since I'm already making a
nitpick branch anyway, why not? Easy peasy change.
  • Loading branch information
ianjmacintosh authored Aug 23, 2024
1 parent 16fc813 commit beffece
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/exercise/06.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function useToggle({
//
// 💰 Sorry if Olivia the Owl is cryptic. Here's what you need to do for that onChange call:
// `onChange(reducer({...state, on}, action), action)`
// 💰 Also note that user's don't *have* to pass an `onChange` prop (it's not required)
// 💰 Also note that users don't *have* to pass an `onChange` prop (it's not required)
// so keep that in mind when you call it! How could you avoid calling it if it's not passed?

// make these call `dispatchWithOnChange` instead
Expand Down
3 changes: 1 addition & 2 deletions src/exercise/06.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ control the state of `on` and call the `onChange` with the suggested changes.
[Production deploy](http://advanced-react-patterns.netlify.app/isolated/final/06.extra-1.js)

Take a look at the example in `./src/examples/warnings.js` (you can pull it up
at
[/isolated/examples/warnings.js](http://localhost:3000/isolated/examples/warnings.js)).
at [/isolated/examples/warnings.js](/isolated/examples/warnings.js)).

Notice the warnings when you click the buttons. You should see the following
warnings all related to controlled inputs:
Expand Down

0 comments on commit beffece

Please sign in to comment.