Skip to content

Support Razor Development #33

@thatplatypus

Description

@thatplatypus

Summary

We have basic preview support for rendering html from a .html file, we should expand this to .razor components as well to enable live previews of components in isolation when possible.

Basic example

I could have a simple razor component and visualize it being rendered. Being able to support markup would be ideal.

Motivation

Ideally we are building towards being able to emulate full stack c# development in the browser. We have scaffolding for web api in place already, the dream would be opening up the possibility of having hosted routes that component previews could actually take advantage of. It probably won't work if the components are using HttpClients directly, but we may be able to intercept the implementation or if they use an interface for fetching data potentially inject a special type into their compilation chain.

Can we have full stack app emulation purely in the browser one day? The prospect is very appealing and goes way beyond what other try dotnet sites are capable of today.

Additional Considerations

Razor components are complex, some may only be possible to be rendered after the solution is compiled. There's also other intricacies like supplying dependencies for the components that leverage [Inject].

Additional context
Razor compilation should get simplified/unified in DotNet 10 which may help us, but it would be good to get some of the structure in place now and simplify later if we can

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfeatureBrand new functionality

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions