How to pass the props.
How to pass the props using lazyComponent(()=>import("@/Example"))
3 Replies
fair-rose•2y ago
You don't pass props in this instance.
You use the RouteApi helper for this
unwilling-turquoiseOP•2y ago
Thank you @Sean Cassiere
@Sean Cassiere do you know how to get location.state value I pass through the navigation how to get it.
fair-rose•2y ago
What do you mean by that? In Tanstack Router pretty much the only state is passed around is either a path parameter or search parameter.
You could set some custom context based data in the
beforeLoad function in your route definition.
Also check what comes out of here, but location.state probably won't be type-safe.