Many SO answers use await Task.Delay(1) to solve various async rendering issues in Blazor (wasm). I've even found a number of places in my own code where doing that "makes it work".
However it's always stated as matter of fact, without a thorough explanation, and I can't find this technique in the docs either.
Some questions:
- Why use
await Task.Delay(1)- when would I use this technique, what is the use case? - The docs do not discuss this (that I could find); is it because it's a hack, or is it a legitimate way to deal with the use case?
- Any difference between
Task.Delay(1)andTask.Yield()?