Blazor, Blazor Webassembly, Dotnet Core, Net Core.
StateHasChanged to notify the component that its state has changed: async void CheckAnswer(int choice) { await TriggerAnimation(choice); if (choice == count) { NextQuestion(); } StateHasChanged(); } To apply the animation class only to the selected choice, we use the GetAnimationClass(choice)