@@ -67,9 +67,10 @@ The `main.jsx` file is the entry point. Open it up and we'll put React Router on
67
67
68
68
👉 ** Add [ ` DataBrowserRouter ` ] [ databrowserrouter ] and a [ ` Route ` ] [ route ] to ` main.jsx ` **
69
69
70
- ``` jsx lines=[3,8-10 ] filename=src/main.jsx
70
+ ``` jsx lines=[4, 9-11] bad lines=[3 ] filename=src/main.jsx
71
71
import React from " react" ;
72
72
import ReactDOM from " react-dom/client" ;
73
+ import App from ' ./App' ;
73
74
import { DataBrowserRouter , Route } from " react-router-dom" ;
74
75
import " ./index.css" ;
75
76
@@ -586,7 +587,7 @@ We'll create new contacts by exporting an `action` in our root route, wiring it
586
587
587
588
👉 ** Create the action and change ` <form> ` to ` <Form> ` **
588
589
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]
590
591
import {
591
592
Outlet ,
592
593
Link ,
@@ -608,6 +609,7 @@ export default function Root() {
608
609
< div id= " sidebar" >
609
610
< h1> React Router Contacts< / h1>
610
611
< div>
612
+ {/* other code */ }
611
613
< Form method= " post" >
612
614
< button type= " submit" > New< / button>
613
615
< / Form>
@@ -1733,7 +1735,7 @@ Pretty simple. Pull the form data off the request and send it to the data model.
1733
1735
1734
1736
👉 ** Configure the route's new action**
1735
1737
1736
- ``` jsx filename=src/main.jsx lines=[]
1738
+ ``` jsx filename=src/main.jsx lines=[5, 21 ]
1737
1739
// existing code
1738
1740
1739
1741
import Contact, {
0 commit comments