Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How to use IEndpointRouteBuilder in Razor class library

$
0
0

I have a Blazor component that I want to be standalone, so I can use it in SSR and WasmSignalR is also used in this componentI want to let the user can use the component with minimal settings

I plan to implement this method extension, but the package I need to use for it depends on the component to SSR. Is there a solution?

This method extension depends on the "Microsoft.AspNetCore.Components.WebAssembly.Server" package, but this package makes the component dependent on SSR.

public static IEndpointRouteBuilder MapActivePageConnectionsAutoModeHub(this IEndpointRouteBuilder endpoints){ endpoints.MapHub<UsersOnlineHub>("/UsersOnlineHub");return endpoints;}

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>