How to mix Blazor with apps that use existing frontend JS frameworks (Angular, React, etc.)
Many customers have already built apps using existing frontend JS frameworks, like Angular, React, etc, but now want to start using Blazor in these apps. We should provide guidance on how to do this.
Any progress on this concept? I think it would be high value It seems to have gone dormant
I also think it is extremely important for the success of Blazor when there is a perspective how to migrate from any JS framework to Blazor step by step a. Starting from scratch is no option for many real projects.
The JavaScript Component Generation sample from the ASP.NET samples shows the way how to do it (currently), however the provided code does not compile at the time of this writing because of some open issues, and it was still not fixed.
Based on the ideas of this sample, I've created a working demo project, see https://github.com/Xenoage/BlazorInAngularDemo . However, lots of steps are still required and the build process is quite fragile. I've collected my problems in the README file.
@Xenoage We haven't attempted to provide migration guidance from existing JS frameworks to Blazor because there are many popular frontend JS frameworks and they evolve quickly, so any content we provide would likely go stale very quickly. The JS component generation sample demonstrates just one potential approach. The sample has now been updated to .NET 6 and should compile cleanly.
@danroth27 this is a very broad area to document, especially when you think about auth integration and publishing problems. Would you mind scoping this to a clear list of thing that you'd like us to address as part of this work? Thanks!
I think this is largely covered by the work we did to enable Blazor components to be rendered from JS: https://docs.microsoft.com/aspnet/core/blazor/components#render-razor-components-from-javascript. In .NET 7 we will also finish up supporting building custom HTML elements with Blazor.