Reputation: 23
I am working on a Blazor project and the texteditor is very very slow when working in the .Razor files. In the .CS, .xml and so on, everything is fine, but in the mixed .Razor it ie. takes up to 3-5 sec. to do a if() {} and I get this:
Does anyone know a trick or a tweek to get the VS 2019 texteditor useful again?
Upvotes: 2
Views: 731
Reputation: 23264
I only use Razor files for rendering the markup. For any logic I create a code behind file by creating a file named MyComponent.Razor.cs
public partial class MyComponent
{
// Supporting methods etc go here
}
It's a better experience!
Upvotes: 2