Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
Hello,
Blazor is an amazing templating engine. While it could benefit from some quality of life improvement, it is light years ahead of XAML in terms of boilerplate and simplicity.
React Native has seen immense success due to the fact that it kept the JSX model but with a native backend, this made a lot of developers use existing knowledge to transition to native apps.
The downside of react is that it uses the JS runtime, I won't go into the details here.
What if Blazor supported a backend-agnostic framework to display components that are either native (WinUI, GTK) or drawn (via Skia or others) that could be used both in desktop and mobile.
Describe the solution you'd like
Here would be an example:
@page "/Users"
@inject LocalesRepo Locales
<StackPanel Classes="VerticalFlex">
@foreach(var user in Users)
{
<Border Classes="UserDisplayBox">
<Label @value="user.Name"/>
</Border>
}
</StackPanel>
@if (Users.Count is 0)
{
<Label Classes="BigText">@Locales.NoUsersInList</Label>
}
<StackPanel Classes="AddContactBox">
<Input @bind="newContact"/>
<Button @onclick="addContact">@Locales.AddContact</Button>
</StackPanel>
@code{
string newContact = string.Empty;
async Task addContact()
{
// do stuff
}
}
This is just a basic proposal, but it would function almost exactly like normal blazor, but native.
Additional context
No response