-
Notifications
You must be signed in to change notification settings - Fork 10.3k
UI refresh or binding does not seem to work in razor components in ASP.NET CORE 3.0 preview 3 #8407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I just tested out the blazorhosted template by creating a new project from it and I don't get the same problem. The problem seems to lie only in the razorcomponents template. |
Thanks for contacting us, @Asshiah. |
Hi, there is absolutly no error on the browser console... |
@Asshiah, even without an error there should be some stuff shown in the console. It's surprising that you see nothing. Without more info we won't be able to help you much. |
It seems what you're experiencing is an issue with the underlying SignalR connection. You can use the docs to try to diagnose it yourself: https://docs.microsoft.com/en-us/aspnet/core/signalr/diagnostics |
In fact even without activating Debug level logging for SignalR, I get the following error in Visual Studio Output when loading the template (I was previously looking in the browser console and not the Visual Studio ouput window):
The thing is the template already uses the following code in the Startup.cs Configure method: app.UseRouting(routes =>
{
routes.MapRazorPages();
routes.MapComponentHub<App>("app");
}); So it appears there is really a problem with the SignalR connection. |
@Asshiah - could you ask turn on the debug logging? Your code looks correct, so I want to try and understand what else is going on before you get that error message. |
@rynowak - Here is the complete ouput from start to navigation to the counter page then clicking on the 'Click me' button with the SignalR debug logging on (sorry for the french in the output):
|
Are you on Windows 7 by any chance? This is a known issue (#6920) in that case, which we are already addressing. Since it's known to work in other cases, I'll close this. But if you think this is a different issue please let us know (and provide further info such as a screenshot of the brower network tab showing the SignalR connection failing) so we can reopen! |
Hi,
I have installed the latest preview of Visual Studio 2019 (Version 16.0.0 Preview 4.1 SVC1) and of the .NET Core SDK (3.0.100-preview3-010431), as well as the latest Blazor extension (16.0.19154.2) and templates (0.9.0-preview3-19154-02).
When initiating a new razorcomponents projet using the CLI tooling and the new templates, I can start the project without any issue.
The data fetching is working just fine:

But it seems the UI refresh when using events (like click) or the databinding is not working properly. When using the Counter page, the counter does not increment when clicking on the button:

I also tried updating an existing blazor (server-side hosted) application from previous beta (0.7) that used to work to the razorcomponents model but I have the same issues: data-binding or UI refresh does not seem to work anymore. The application is launching and loading data just fine. It's only the logic in the razor pages using binding that does not work anymore.
For instance, the following code does not work as expected:
I am missing something here?
The text was updated successfully, but these errors were encountered: