-
-
Notifications
You must be signed in to change notification settings - Fork 649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(start): move scripts
,links
, and meta
to the head
#2571
base: main
Are you sure you want to change the base?
Conversation
this change only changes the interface presented to the dev (AnyRoute). the actual interface for a match (AnyRouteMatch) remains the same
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 03f8e9d. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution
✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
@@ -111,20 +111,17 @@ export function afterHydrate({ router }: { router: AnyRouter }) { | |||
} | |||
} | |||
|
|||
const meta = | |||
match.status === 'success' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the status not relevant anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No anymore, since that was only dependent for the loaderData.
Now the loaderData is always possibly undefined.
Closes #2426
As discussed in #2426, this change adds a new method named
head
ontoRoute
. This function takes in the same parameters asmeta
and returns the values used forscripts
,links
, andmeta
. Additionally, theloaderData
argument is made to be possiblyundefined
as this execution may happen both before and after theloader
has resolved.The
meta
,links
, andscripts
methods onRoute
as being dropped and replaced by this newhead
method.