Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Video Player
00:00
00:00
00:00
- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Let’s go over the key concepts you learned in this stage.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
We learned a ton in this stage,
0:00
we found out that React doesn't
have built-in routing features.
0:02
So, many developers rely on
React Router to build single page apps
0:06
that dynamically load components and
0:10
change what's displayed in the browser
as a user navigates the app.
0:12
So we got started by installing React
Router to our app using the terminal.
0:17
Since our app runs in a web browser,
0:22
the very first React component we
used was the BrowserRouter component.
0:24
We nested our app component inside
BrowserRouter to help keep the UI in sync
0:29
with the URL.
0:33
Then we learned the basics of creating
routes and some of the benefits of
0:35
React Router's simple declarative
approach to writing routes.
0:39
By declarative,
0:43
I mean that React lets you write
the code that describes the end result.
0:44
For instance, the route's component
selects the route whose path
0:48
property best matches the URL and
loads the corresponding component.
0:52
All of this happens without you having
to define how it should happen.
0:57
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up