Skip to content

Commit 4493d9f

Browse files
authored
Docs/tutorial (#9173)
1 parent 932f0e9 commit 4493d9f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,4 @@
8080
- xavier-lc
8181
- fz6m
8282
- TkDodo
83+
- infoxicator

docs/getting-started/tutorial.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ The `main.jsx` file is the entry point. Open it up and we'll put React Router on
6767

6868
👉 **Add [`DataBrowserRouter`][databrowserrouter] and a [`Route`][route] to `main.jsx`**
6969

70-
```jsx lines=[3,8-10] filename=src/main.jsx
70+
```jsx lines=[4, 9-11] bad lines=[3] filename=src/main.jsx
7171
import React from "react";
7272
import ReactDOM from "react-dom/client";
73+
import App from './App';
7374
import { DataBrowserRouter, Route } from "react-router-dom";
7475
import "./index.css";
7576

@@ -586,7 +587,7 @@ We'll create new contacts by exporting an `action` in our root route, wiring it
586587

587588
👉 **Create the action and change `<form>` to `<Form>`**
588589

589-
```jsx filename=src/routes/root.jsx lines=[5,9-11,22-24]
590+
```jsx filename=src/routes/root.jsx lines=[7,5,9-11,22-24]
590591
import {
591592
Outlet,
592593
Link,
@@ -608,6 +609,7 @@ export default function Root() {
608609
<div id="sidebar">
609610
<h1>React Router Contacts</h1>
610611
<div>
612+
{/* other code */}
611613
<Form method="post">
612614
<button type="submit">New</button>
613615
</Form>
@@ -1733,7 +1735,7 @@ Pretty simple. Pull the form data off the request and send it to the data model.
17331735

17341736
👉 **Configure the route's new action**
17351737

1736-
```jsx filename=src/main.jsx lines=[]
1738+
```jsx filename=src/main.jsx lines=[5, 21]
17371739
// existing code
17381740

17391741
import Contact, {

0 commit comments

Comments
 (0)