Removing <Outlet /> breaks Developer Blog tutorial #1571
-
Hi, I was following Quickstart Tutorial and it was stated that for creating a new Link to posts "you might want to just delete everything that's there." However, removing the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The Outlet definies the point where the content of the nested routes is inserted. Since you removed the outlet from the root.tsx, the content of your posts/index.tsx has nowhere to go, to put it simply. This is why you only see the Link to Posts, which is part of the root.tsx. Every Page is constructed using the nested routes, starting at the root(.tsx). If there is no Outlet, no additional layouts (like the one of your posts page) are included. You can read up on nested routes here: |
Beta Was this translation helpful? Give feedback.
The Outlet definies the point where the content of the nested routes is inserted. Since you removed the outlet from the root.tsx, the content of your posts/index.tsx has nowhere to go, to put it simply. This is why you only see the Link to Posts, which is part of the root.tsx. Every Page is constructed using the nested routes, starting at the root(.tsx). If there is no Outlet, no additional layouts (like the one of your posts page) are included.
You can read up on nested routes here:
https://remix.run/docs/en/v1/guides/routing#what-are-nested-routes