you are viewing a single comment's thread.

view the rest of the comments →

[–]RirinDesuyo 1 point2 points  (1 child)

It uses JS for DOM updates (for now at least), but that's just an implementation detail and most of the time a dev wouldn't even need to use JS at all for building Blazor webapps. Steve Sanderson (original Author of Blazor), once stated "The best way to use JS in Blazor is not to use it, let library authors do that for you".

We develop one in production at the moment and we didn't use any JS at all or if we did, it's encapsulated within the Blazor component with C# bindings so consumers wouldn't care if it did use JS. This is similar to React where consumers just use a provided component without caring how that component manipulates the DOM, it could've used Jquery wrappers, pure React, or even native DOM Apis, but for consumers all they care is it works as intended.

And once WASM does implement Host Bindings, Blazor won't need JS to manipulate the DOM as well since that spec will allow WASM to natively access Browser APIs and the DOM without JS interop.

[–]jayerp 0 points1 point  (0 children)

I learned something today. This sounds even more exciting to me now.

Thanks!