Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
The problem is related to component rendering in blazor preview 6 with the new template project (blazor web application).
A blink effect is visible when the component is rendered and the component has a positioning problem.
The second Counter component is moved at the top of <h1>Hello, world!</h1>
Expected Behavior
Both components should be rendered below the text "Welcome to your new app."
Steps To Reproduce
- Install .NET 8 Preview 6
- Clone https://github.com/mkArtakMSFT/BlazorWasmClientInteractivity
- Create a Counter component with the following code:
<button type="button" @onclick="IncrementCount">Current count: @_currentCount</button>
@code {
int _currentCount = 0;
[Parameter]
public int IncrementAmount { get; set; } = 1;
void IncrementCount()
{
_currentCount += IncrementAmount;
}
}
- In the Index.razor, insert the following code:
@page "/"
<PageTitle>Index</PageTitle>
<h1>Hello, world!</h1>
Welcome to your new app.
<Counter IncrementAmount="2" @rendermode="@(RenderMode.Server)" />
<Counter IncrementAmount="2" @rendermode="@(RenderMode.Server)" />
- Build and run the app
- Browse to /
Exceptions (if any)
No response
.NET Version
8.0.100-preview.6.23330.14
Anything else?
Additional infos
- IDE: Visual Studio Community
- Short video describe the problem: https://streamable.com/tz9a1u
SDK .NET
Version: 8.0.100-preview.6.23330.14
Commit: ba97796b8f
Environnement d'exécution :
OS Name: Windows
OS Version: 10.0.23493
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.100-preview.6.23330.14\
.NET workloads installed:
Il n'y a aucune charge de travail installée à afficher.
Host:
Version: 8.0.0-preview.6.23329.7
Architecture: x64
Commit: 5340be2ccc
.NET SDKs installed:
7.0.304 [C:\Program Files\dotnet\sdk]
7.0.400-preview.23330.10 [C:\Program Files\dotnet\sdk]
8.0.100-preview.6.23330.14 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0-preview.5.23302.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0-preview.6.23329.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0-preview.5.23280.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0-preview.6.23329.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.0-preview.5.23302.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.0-preview.6.23329.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download