From 9990fd54dab08dce906c3af079ad866536811f72 Mon Sep 17 00:00:00 2001 From: Jason Hughes <13565648+chasinhues@users.noreply.github.com> Date: Tue, 21 Dec 2021 09:09:42 +1000 Subject: [PATCH 1/2] Update typos in concepts.md --- docs/getting-started/concepts.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/getting-started/concepts.md b/docs/getting-started/concepts.md index a9f03d5189..f7f0686bae 100644 --- a/docs/getting-started/concepts.md +++ b/docs/getting-started/concepts.md @@ -228,9 +228,9 @@ React Router takes advantage of this browser feature, abstracts it a bit, and su You can think about `location.state` just like `location.hash` or `location.search` except instead of putting the values in the [URL](#url) it's hidden--like a super secret piece of the URL only the programmer knows about. -A couple great use-cases for location state are: +A couple of great use-cases for location state are: -- Telling the next page where the user came from and branching the UI. The most popular implementation here is the showing a record in a modal if the user clicked on an item in a grid view, but if they show up to the URL directly, show the record in its own layout (pinterest, old instagram). +- Telling the next page where the user came from and branching the UI. The most popular implementation here is showing a record in a modal if the user clicked on an item in a grid view, but if they show up to the URL directly, show the record in its own layout (pinterest, old instagram). - Sending a partial record from a list to the next screen so it can render the partial data immediately and then fetching the rest of the data afterward. You set location state in two ways: on `` or `navigate`: @@ -383,7 +383,7 @@ let routes = [ In fact, instead of `` you can use the hook `useRoutes(routesGoHere)` instead. That's all `` is doing. -As you can see, routes can define a multiple [segments](#segment) like `:teamId/edit`, or just one like `:teamId`. All of the segments down a branch of the [route config](#route-config) are added together to create a final [path pattern](#path-pattern) for a route. +As you can see, routes can define multiple [segments](#segment) like `:teamId/edit`, or just one like `:teamId`. All of the segments down a branch of the [route config](#route-config) are added together to create a final [path pattern](#path-pattern) for a route. ### Match Params @@ -625,7 +625,7 @@ Think of it this way, if you're not at one of the child routes' paths, the `` allows the user to change the URL when they click it. React Router will prevent the browser's default behavior and tell the [history](#history) to push a new entry into the [history stack](#history-stack). The [location](#location) changes and the new [matches](#match) will render. -However, links are accessible in that they +However, links are accessible in that they: - Still render a `` so all default accessibility concerns are met (like keyboard, focusability, SEO, etc.) - Don't prevent the browser's default behavior if it's a right click or command/control click to "open in new tab" From 0a664ad3b284cc3bf0dd1ac018cb7f054094cbc0 Mon Sep 17 00:00:00 2001 From: Jason Hughes Date: Tue, 21 Dec 2021 09:18:07 +1000 Subject: [PATCH 2/2] Update contributors.yml --- contributors.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/contributors.yml b/contributors.yml index 70d633a861..bb52fd0bf5 100644 --- a/contributors.yml +++ b/contributors.yml @@ -21,3 +21,4 @@ - timdorr - turansky - vijaypushkin +- chasinhues