Fullstack GUI library for web, desktop, mobile, and more. In Rust using a HTML + CSS renderer built on top of Servo.

You are viewing a single thread.
View all comments
11 points

We’ve been using Leptos at work, which is a similar framework (and probably shares half the stack with Dioxus).

And yeah, it’s really good. My favorite thing about using Rust for the UI is algebraic data types.
So, in Rust when you call a function which can fail, there isn’t an exception being thrown, but rather you get a Result-type as return value.
This Result can either contain an Ok with the actual return value inside. Or it can contain an Err with an error message inside.
So, in your UI code, you just hand this Result all the way to your display code and there you either display the value or you display the error.

No more uninitialized variables, no more separate booleans to indicate that the variable is uninitialized, no more unreadable multi-line ternaries.
It just becomes so much simpler to load something from the backend and display it, which is kind of important in frontend code.

permalink
report
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 2.3K

    Monthly active users

  • 981

    Posts

  • 8.9K

    Comments