Skip to content

Is calling Task.Yield() in OnInitializedAsync() a safe way to get @ref= variables populated? #50819

Answered by javiercn
DavidThielen asked this question in General
Discussion options

You must be logged in to vote

Nope.

It's only ever safe to access ElementReference instances within OnAfterRender|Async

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by javiercn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
3 participants