Blazor Server - How to handle situation when user is faster then SignalR?

Yaron Amar 1 Reputation point
2022-06-20T21:03:34.777+00:00

I have a complex Blazor server app and I run into situations that user interact with the form and while the server is trying to manipulate the DOM via SignalR, the user manage to do other things in the form. When I debug the app or using PC in the LAN, it works fine because it is very fast. But when I browse from cell phone it is noticeable.

One of those situations is reading a barcode using barcode reader. The flow is:

user scan barcode into textbox
the barcode is validated
if OK or Bad the user gets a message and the textbox is cleared
What happen is that the user is able to scan other barcode before any render is being done to its DOM.

Any solutions ideas would be appreciated

Tx Yaron

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,395 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,270 questions
{count} votes