Ask Your Question
2

Why are parameters not being passed in Blazor WebAssembly when hosted in Blazor Server?

asked 2022-06-10 11:00:00 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-04-08 21:00:00 +0000

woof gravatar image

Parameters are not being passed in Blazor WebAssembly when hosted in Blazor Server because Blazor WebAssembly and Blazor Server are two different hosting models with different architectures.

Blazor WebAssembly is a client-side architecture where the application is downloaded and executed in the browser. The Blazor component is loaded in the browser and all the parameters are passed to it during the initialization.

On the other hand, Blazor Server is a server-side architecture where the application is executed on the server and the UI is updated on the client-side via SignalR. In this case, the component runs on the server and the parameter values are sent to the server over SignalR. The server then updates the component and sends the updated UI to the client via SignalR.

Therefore, when you host Blazor WebAssembly inside Blazor Server, the parameter values are not passed to the component during initialization as they are in Blazor WebAssembly. Instead, they are passed to the server over SignalR, which then updates the component and sends the updated UI to the client.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-06-10 11:00:00 +0000

Seen: 26 times

Last updated: Apr 08 '21