Allow passing meta config to the <Meta /> component using props #3941
runoncedev
started this conversation in
Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've a
root.tsx
file with:Both the default exported component and
CatchBoundary
use the<Meta />
component, this causes the 200 and 404 pages to both have the title "New Remix App".But I wanted to change the title in the case of 404 pages, so I removed the
<Meta />
component fromCatchBoundary
and added a<title>
:But this is not great because now I need to manually add the rest of the meta tags:
So I wondered what if we could simple pass meta config to the
<Meta />
component through props, something like:This way it could overwirte the values from the exported
MetaFunction
and render:Just as a reference, I really liked how this problem is solved in next/head.
Beta Was this translation helpful? Give feedback.
All reactions