Using Blazor (i.e. WebAssembly) + javascript

.net blazor javascript webassembly

Question

Im really excited at what WebAssembly can bring to us web UI developers. Now correct me if im wrong, but a web assembly / blazor project can easily and happily coexist with javascript. The script might handle all the http web requests and various clientside manipulations.

Your thoughts?

Accepted Answer

Yes, you could do that, as of version 0.4 it is easy to interop between c# and javascript and vise versa.

But you don't have to, the beauty of blazor is that you can just use the HttpClient class from .net framework System.Net.Http namespace for calls to your backend. And make razor cshtml components for DOM manipulation.

More on http calls from blazor

More on js interop




Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why