To give some context, I'm trying to connect an existing C# application with a React SPA. The problem is, that the C# code includes some really difficult mathematical calculations and I can't rewrite it.
My idea was to build a Blazor WebAssembly application, which includes the existing code base.
After countless hours of trying several different solutions, I figured out, that it's possible to copy the Blazor "_framework" folder (generated by building the project) into my React public folder. This allowed my to call static C# methods from my JavaScript code. All good so far, but unfortunately it's not possible to call non-static methods.
According to this article it should be possible to send the C# instance via IJSRuntime, but this isn't working for my case. From my perspective it looks like the IJSRuntime doesn't get injected because the JavaScript code is not part of Blazor.
Does anyone know any solution how to inject the IJSRuntime with the React environment? Or is there any better solution to call C# code from a React application?