Method UseRouteLoaderData
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
UseRouteLoaderData<T>(string)
Returns the loader data of the route with the given Id (or
RouteId) among the current location's matches, cast to
T, from any component beneath the provider: React Router's
useRouteLoaderData. Returns default when that route has no data or is not matched.
public static T? UseRouteLoaderData<T>(string routeId)
Parameters
routeIdstring
Returns
- T
Type Parameters
TExpected loader data type.
Exceptions
- InvalidOperationException
No
V.RouterProvideris mounted above the caller.