Skip to content
Discussion options

You must be logged in to vote

The Layout element is supposed to be used to render html markup in both the case of an error and a valid page, which means you can't use a useLoaderData hook inside of it because in case of an ErrorBoundary it doesn't exist. Try moving your useLoaderData to the App export. Whatever you return from the App will be rendered inside the Layout as children

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bartylla
Comment options

@AlemTuzlak
Comment options

Answer selected by bartylla
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants