You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to have styles in a catch boundary, we need to explicitly add <Links /> in there or manually <link /> to them.
In a remix-island app, this would mean we'd want to render <Head /> in the catch boundary
Unfortunately this does not work, either
If we also add <Scripts /> back in our catch boundary we get the styles in the client, but they're missing in the initial server render
From what I understand, remix deliberately does not teat the catch-boundary as part of the route. It's a "hey nothing you configured matches this, we don't know what to do here" scenario. Where it might be just false to add the same links, meta-tags to the page as the status: 200 version of the same page has.
I'm not sure how to handle this case in remix-island, the first thought coming to mind is that we'd need a CatchBoundaryHead component but that also feels a little strange.
All that said... as written in the pitfalls/notes section of the readme I think it makes sense to move everything global out of remix LinksFunction and MetaFunction and into the static html template in entry.server.ts. And if you put your styles in there you should at least have those loaded on 404 pages. (I understand that does not help with setting a custom title or tracking for those pages)
When catch boundaries are hit, styles and other links are not loaded correctly into the head tag.
Error boundaries, however, work completely fine.
The text was updated successfully, but these errors were encountered: