I went through the docs of Blazor @key usage. But I am not sure if it works correctly in one specific case that wasn't mentioned there.
What happens if instead of this code in Page.razor:
<div> @foreach (var person in people) {<Details @key="person" Person="@person" /> }</div>I would place the @key inside the Details component itself. So for Details.razor it would look like:
<div @key=@Person> @* The rest of the component UI *@</div>@code{ [Parameter] public required Person Person { get; set; }}because that way when I loop this component in multiple pages I dont have to always specify the @key parameter in the foreach. But does the blazor take it as the same/different scope ?