|
4 years ago | |
---|---|---|
.vscode | 4 years ago | |
docs | 4 years ago | |
examples | 4 years ago | |
notes | 4 years ago | |
packages | 4 years ago | |
src | 4 years ago | |
.gitignore | 4 years ago | |
Cargo.toml | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago |
Frontend that scales.
Dioxus is a portable, performant, and ergonomic framework for building cross-platform user experiences in Rust.
fn Example(cx: Context<()>) -> VNode {
let (selection, set_selection) = use_state(&cx, || "..?");
cx.render(rsx! {
h1 { "Hello, {selection}" }
button { "?", onclick: move |_| set_selection("world!")}
button { "?", onclick: move |_| set_selection("Dioxus 🎉")}
})
};
Dioxus can be used to deliver webapps, desktop apps, static pages, liveview apps, eventually mobile apps (WIP), and more. At its core, Dioxus is entirely renderer agnostic and has great documentation for creating new renderers for any platform.
If you know React, then you already know Dioxus.
Web | Desktop | Mobile | State | Docs | Tools |
---|---|---|---|---|---|
Feature | Dioxus | React | Notes for Dioxus |
---|---|---|---|
----- Phase 1 ----- | ----- | ----- | ----- |
Conditional Rendering | ✅ | ✅ | if/then to hide/show component |
Map, Iterator | ✅ | ✅ | map/filter/reduce rsx! |
Keyed Components | ✅ | ✅ | advanced diffing with keys |
Web | ✅ | ✅ | renderer for web browser |
Desktop (webview) | ✅ | ✅ | renderer for desktop |
Context | ✅ | ✅ | share state through the tree |
Hook | ✅ | ✅ | memory cells in components |
SSR | ✅ | ✅ | render directly to string |
Runs natively | ✅ | ❓ | runs as a portable binary w/o a runtime (Node) |
Component Children | ✅ | ✅ | cx.children() as a list of nodes |
Null components | ✅ | ✅ | allow returning no components |
No-div components | ✅ | ✅ | components that render components |
Fragments | ✅ | ✅ | rsx! can return multiple elements without a root |
Manual Props | 👀 | ✅ | Manually pass in props |
NodeRef | 👀 | ✅ | gain direct access to nodes |
Controlled Inputs | ✅ | ✅ | stateful wrappers around inputs |
CSS/Inline Styles | 🛠 | ✅ | syntax for inline/conditional styles |
1st class global state | 🛠 | ✅ | redux/recoil/mobx on top of context |
----- Phase 2 ----- | ----- | ----- | ----- |
1st class router | 👀 | ✅ | Hook built on top of history |
Assets | 👀 | ✅ | include css/svg/img url statically |
Integrated classnames | 🛠 | ❓ | built-in classnames |
Suspense | 👀 | 🛠 | schedule future render from future/promise |
Transition | 👀 | 🛠 | High-level control over suspense |
Animation | 👀 | ✅ | Spring-style animations |
Mobile | 👀 | ✅ | Render with cacao |
Desktop (native) | 👀 | ✅ | Render with native desktop |
3D Renderer | 👀 | ✅ | react-three-fiber |
----- Phase 3 ----- | ----- | ----- | ----- |
Portal | ❓ | ✅ | cast elements through tree |
Error/Panic boundary | ❓ | ✅ | catch panics and display custom BSOD |
Code-splitting | 👀 | ✅ | Make bundle smaller/lazy |
LiveView | 👀 | ❓ | Example for SSR + WASM apps |
✅ = implemented and working 👀 = not yet implemented or being worked on 🛠 = actively being worked on ❓ = not sure if will or can implement