Skip to content
Discussion options

You must be logged in to vote

It's entirely possible there's an XY problem going on here. (I might be wrong, of course.)

I think you'd ordinarily use the extract function in this way in a server function where you needed it, rather than providing it as additional context in .leptos_routes_with_context().

This is because if you do it in leptos_routes_with_context(), it will only be there on the initial page load from the server, and not on subsequent client-side navigations (assuming you are using the ordinary routing setup). Whereas if you call it in the server function, it will be available in the server function whether it's called during server side rendering, or from the browser on a subsequent navigation.

That's …

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@UserJHansen
Comment options

Comment options

You must be logged in to vote
2 replies
@UserJHansen
Comment options

@UserJHansen
Comment options

Answer selected by UserJHansen
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants