UI Framework Built on top Of WPF Heavily inspired To ReactJS and Flutter

UI Framework Built on top Of WPF Heavily inspired To ReactJS and Flutter

UI framework built on top of WPF heavily inspired to ReactJS and Flutter

ReactorUI for WPF (aka reactorui-wpf)

UI framework built on top of WPF heavily inspired to ReactJS and Flutter

ReactorUI for WPF is a .NET UI library written on top of WPF that let you write Windows applications using a MVU approach much similar to Flutter or ReactJS.

One key feature of ReactorUI is the Hot-Reload module: you'll be able to modify the application source code and UI without restarting the app.

Traditionally, WPF/UWP/WinUI/Avalonia/Xamarin/Uno frameworks encourage a MVVM approach in writing applications:

There is a view (usually written in XAML):

<Window x:Class="WpfReactorUI.DemoApp.LoginWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <StackPanel
        VerticalAlignment="Center"
        HorizontalAlignment="Center">
        <TextBox Text="{Binding Username}"/>
        <TextBox Text="{Binding Password}"/>
    </StackPanel>
</Window>

that is linked/bound to ViewModel (written in C#/VB.NET/F# etc):

public class LoginWindowViewModel : BindableObject
{
    private string _username;

    public string Username
    {
        get => _username;
        set
        {
            if (_username != value)
            {
                _username = value;
                OnPropertyChanged();
                LoginCommand.ChangeCanExecute();
            }
        }
    }

    private string _password;

    public string Password
    {
        get => _password;
        set
        {
            if (_password != value)
            {
                _password = value;
                OnPropertyChanged();
                LoginCommand.ChangeCanExecute();
            }
        }
    }

    private Command _loginCommand;

    public Command LoginCommand
    {
        get
        {
            _loginCommand = _loginCommand ?? new Command(OnLogin, () => !string.IsNullOrWhiteSpace(Username) && !string.IsNullOrWhiteSpace(Password));
            return _loginCommand;
        }
    }

    private void OnLogin()
    {
        //Username contains username and Password contains password
        //make login..
    }
}

ReactorUI uses a MVU approach: you write components instead of controls in a single file mixing UI and back-end code. Following is the same login screen written in ReactorUI:

public class LoginComponentState : IState
{
    public string Username { get; set; }

    public string Password { get; set; }
}

public class LoginComponent : RxComponent<LoginComponentState>
{
    public override VisualNode Render()
        => new RxStackPanel()
        {
            new RxTextBox()
                .Text(State.Username)
                .OnTextChanged(text => SetState(s => s.Username = text)),
            new RxTextBox()
                .Text(State.Password)
                .OnTextChanged(text => SetState(s => s.Password = text)),
            new RxButton()
                .OnClick(OnLogin)
        };

    private void OnLogin()
    {
        //login with State.Username and State.Password
    }
}

One big advantage of the ReactorUI approach is that its state live externally to the component making possible hot reloading it.

Download Details:

Author: adospace

Source Code: https://github.com/adospace/reactorui-wpf

flutter reactjs dart

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Google's Flutter 1.20 stable announced with new features - Navoki

Google has announced new flutter 1.20 stable with many improvements, and features, enabling flutter for Desktop and Web

What is Flutter and why you should learn it?

Flutter is an open-source UI toolkit for mobile developers, so they can use it to build native-looking Android and iOS applications from the same code base for both platforms. Flutter is also working to make Flutter apps for Web, PWA (progressive Web-App) and Desktop platform (Windows,macOS,Linux).

6 Things About HTTP Request in Dart For Beginners

Here is an http request to get a user's data using GET request, First, we have to make an async function that returns a type. If you are here and a beginner, that means you want to learn everything about making an API request using Dart in Flutter, then you are in the right place for the HTTP tutorial.

Adobe XD plugin for Flutter with CodePen Tutorial

Recently Adobe XD releases a new version of the plugin that you can use to export designs directly into flutter widgets or screens.

Reactive redux store for Dart & Flutter Redux implementation based on Dart Stream

Reactive redux store for Dart & Flutter Redux implementation based on Dart Stream, with the power of RxDart