I've started looking at Blazor, and as I've built up some common Blazor Components, I've started to realise that I'm still unclear about a few design considerations. Theres not a great deal of guidance out there at the moment, and from what I have read it seems that the guidance/best practice will be put together from developers initial experience.
So these are the questions that are still niggling at me
Use of JavaScript.
Is JavaScript to be avoid as much as possible, I've read (and can understand why) modifying the DOM with JS could cause problems, and there are still a number of holes in the API that can only be solved with JS (setting focus being one example), But should JS be avoided where possible?
Performance
From what I can see the entire page is rendered regardless of the change made to it (the render tree is diff'ed and the changes applied to the DOM), this would appear to be an acceptable approach for low frequency page changes, but for finer more frequent changes will this end up causing performance problems? I'm thinking of interactions like drag and drop, opening menus, any mouse move interaction that changes the UI. Will this style of change remain the job of JavaScript?
Async and events
The Blazor environment strongly encourages the use of async methods, which on whole works, until you get into handling events raised within the Model or ViewModel where the handler needs to invoke Async methods. An approach I've been experimenting with is to use Async Events, but I'm unsure of whether this will cause problems down the line. The other approach is to block on the Task.Wait, but this seems unsatisfactory. I guess this is not entirely a Blazor design issue, but it seems to have presented itself quite a lot in my Blazor experience. Thoughts?