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

chore(tutorial): update routing section about splash screen #4924

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/docs/tutorial/chapter1/first-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,21 @@ const Routes = () => {
export default Routes
```

As long as you have a route with path `/`, you'll never see the initial Redwood splash screen again.

When no route can be found that matches the requested URL, Redwood will render the `NotFoundPage`.

Try changing the route to something like:

```jsx
<Route path="/hello" page={HomePage} name="home" />
```

As soon as you add your first route, you'll never see the initial Redwood splash screen again. From now on, when no route can be found that matches the requested URL, Redwood will render the `NotFoundPage`. Change your URL to [http://localhost:8910/hello](http://localhost:8910/hello) and you should see the homepage again.
The splash screen is available again at [http://localhost:8910/](http://localhost:8910/), giving you a list of all the available URLs in your app.

![Redwood Splash Screen](https://user-images.githubusercontent.com/17789536/160120107-1157af8e-4cbd-4ec8-b3aa-8adb28ea6eaf.png)

Go to `/hello` and you should see the homepage again.

Change the route path back to `/` before continuing!

Expand Down