React Foundations·Practice drills 1

Drill 2: Recall — Routing and application structure

Close the lesson and reproduce the example from memory.

Intermediate 5 min read Lesson 30 of 300 Challenge included
What you will be able to do
  • Close the lesson and reproduce the example from memory.

Practice task

Close the lesson and reproduce the example from memory.

router.jsxJSX
import { createBrowserRouter } from 'react-router-dom'
import Dashboard from './Dashboard'
import Lesson from './Lesson'
import NotFound from './NotFound'

export const router = createBrowserRouter([
  { path: '/', element: <Dashboard /> },
  { path: '/lessons/:slug', element: <Lesson /> },
  { path: '*', element: <NotFound /> },
])
Your turn

Write your answer

Easy

Close the lesson and reproduce the example from memory.

TEXT · starter
Your answer…
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Lesson 30 of 300 · 0% of course