@page "/"
<style type="text/css">
.item {
animation: example 4s;
@@keyframes example {
from {
background-color: red;
}
to {
background-color: yellow;
}
}
}
</style>
@foreach (var item in Items) {
<SomeComponent MyValue="@item"/>
}
<button @onclick="Refresh">refresh</button>
@code{
public List<int> Items = new List<int> { 1, 2, 3};
public void Refresh() {
var rand = new Random();
Items = new List<int> { rand.Next(10), rand.Next(10), rand.Next(10)};
}
}