Skip to content

Commit

Permalink
fix typos in tutorial.md (#8244)
Browse files Browse the repository at this point in the history
  • Loading branch information
rwieruch committed Nov 5, 2021
1 parent c68df0c commit d6650e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/getting-started/tutorial.md
Expand Up @@ -376,7 +376,7 @@ The `"*"` has special meaning here. It will match only when no other routes do.
## Reading URL Params
Alright, back to the individual invoice URLs. Let's add a route for a specific invoice. We just visted some URLs like `"/invoices/1998"` and `"/invoices/2005"`, lets make a new component at `src/routes/invoice.js` to render at those URLs:
Alright, back to the individual invoice URLs. Let's add a route for a specific invoice. We just visited some URLs like `"/invoices/1998"` and `"/invoices/2005"`, lets make a new component at `src/routes/invoice.js` to render at those URLs:

```js filename=src/routes/invoice.js
export default function Invoice() {
Expand Down Expand Up @@ -673,7 +673,7 @@ export default function Invoices() {
Check this out, as the user types:
- `setSearchParams()` is putting the `?filter=...` search params in the URL and rerendering the router.
- `useSearchParams` is now returing a [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) with `"filter"` as one of it's values.
- `useSearchParams` is now returning a [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) with `"filter"` as one of its values.
- We set the value of the input to whatever is in the filter search param (it's just like `useState` but in the URLSearchParams instead!)
- We filter our list of invoices based on the filter search param.
Expand Down

0 comments on commit d6650e2

Please sign in to comment.