Skip to content

Add react-router-dom install step to React tutorial#3124

Open
fibibot wants to merge 2 commits into
mainfrom
docs-improve/react-router-install-step
Open

Add react-router-dom install step to React tutorial#3124
fibibot wants to merge 2 commits into
mainfrom
docs-improve/react-router-install-step

Conversation

@fibibot
Copy link
Copy Markdown
Contributor

@fibibot fibibot commented May 14, 2026

The "Add a router" section in examples/tutorials/react.md jumped
straight into import { BrowserRouter, Route, Routes } from "react-router-dom"
without ever telling the reader to install the package. A user
following the tutorial verbatim hits an unresolved-import error as
soon as they save App.tsx — the package isn't in any deno add
command on the page, even though it's in the upstream
tutorial-with-react repo's deno.json.

This adds the missing deno add npm:react-router-dom step and a
short explanation of what BrowserRouter, Routes, and Route do,
plus how the :selectedDinosaur path parameter flows through to the
useParams() call in Dinosaur.tsx — which previously appeared
without motivation.

Verified by running deno add npm:react-router-dom against
denoland/deno:latest (deno 2.7.14) in a clean directory; it
resolves to react-router-dom@7.15.0 and writes a clean deno.json
imports entry. No code blocks were changed, so the rest of the
tutorial is unaffected.

Closes bartlomieju/orchid-inbox#46

The "Add a router" section imported react-router-dom in three files
without ever telling the reader to install it, so following the
tutorial verbatim produced unresolved-import errors. Added the
deno add command and a short explanation of what BrowserRouter,
Routes, and Route do, including how the :selectedDinosaur path
parameter flows to useParams() in Dinosaur.tsx.
@fibibot
Copy link
Copy Markdown
Contributor Author

fibibot commented May 14, 2026

@bartlomieju ready for review when you have a moment.

Copy link
Copy Markdown
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, remove em dashes

Copy link
Copy Markdown
Contributor

@lunadogbot lunadogbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is green and the added deno add npm:react-router-dom step matches the later bare react-router-dom imports. No blockers found.

@lunadogbot
Copy link
Copy Markdown
Contributor

@bartlomieju this is ready to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants