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
Similar to how route.options.meta() already behaves it would be nice to pass the loaderData and match to the links() function as well.
For my specific use-case I want to generate a canonical link element that is rendered via the Meta component inside the head. To do this I need some data from the current match and loaderData. Those are available inside meta() but not inside links().
It could be worth exploring @lo1tuma suggestion here.
The only consideration I see here is that we'd now be expecting links() to be executed only after the loader has completed. Therefore, you wouldn't be able to resolve links() into the <head> before the loader has completed its work.
Similar to how
route.options.meta()
already behaves it would be nice to pass theloaderData
andmatch
to thelinks()
function as well.For my specific use-case I want to generate a
canonical
link element that is rendered via theMeta
component inside the head. To do this I need some data from the currentmatch
andloaderData
. Those are available insidemeta()
but not insidelinks()
.Originally posted by @lo1tuma in #2419
The text was updated successfully, but these errors were encountered: