Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tutorial.md #8717

Merged
merged 3 commits into from Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions contributors.yml
Expand Up @@ -45,3 +45,4 @@
- turansky
- underager
- vijaypushkin
- mfijas
4 changes: 2 additions & 2 deletions docs/getting-started/tutorial.md
Expand Up @@ -172,7 +172,7 @@ export default function Invoices() {

Finally, let's teach React Router how to render our app at different URLs by creating our first "Route Config" inside of `main.jsx` or `index.js`.

```tsx lines=[2,4-5,13-19] filename=src/main.jsx
```tsx lines=[2,4-5,8-9,13-19] filename=src/main.jsx
import { render } from "react-dom";
import {
BrowserRouter,
Expand Down Expand Up @@ -806,7 +806,7 @@ export function deleteInvoice(number) {

Now let's add the delete button, call our new function, and navigate to the index route:

```js lines=[1-2,5-6,17-26] filename=src/routes/invoice.jsx
```js lines=[1-6,20-29] filename=src/routes/invoice.jsx
import {
useParams,
useNavigate,
Expand Down