Replies: 2 comments 5 replies
-
you should define title in loader, meta and Component get title from loader |
Beta Was this translation helpful? Give feedback.
3 replies
-
There's no way, because loaders run before MetaFunction and before the rendering The only place you could do it is inside entry.server where you have access to EntryContext which contains the data from the loaders and meta, but then it will only run on SSR. |
Beta Was this translation helpful? Give feedback.
2 replies
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.
-
My use case is that I am moving Google Analytics from client-side to server-side.
I need to send two parameters to Google Measurement API: current URL and the page title.
I know how to get the current URL inside of a loader. However, there is no way to get the current page title inside of the loader.
I am not sure where would I need to add my code to get URL and title for every request.
Is there some hook I could fire after the page has been rendered? That would give me the title too
Beta Was this translation helpful? Give feedback.
All reactions