Jonathan Kelley d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
..
PWA-example e65c5f0eb3 depreciate the render macro 1 éve
assets 8918bf9463 Make the calculator more beautiful 1 éve
mobile_demo 451a2b6cfc Trim off 150 deps for examples 1 éve
openid_connect_demo e65c5f0eb3 depreciate the render macro 1 éve
query_segments_demo b58eb04278 Fix basic routers 1 éve
tailwind e65c5f0eb3 depreciate the render macro 1 éve
README.md ee25c03e74 fix some clippy lints 1 éve
all_events.rs d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
calculator.rs d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
clock.rs e65c5f0eb3 depreciate the render macro 1 éve
compose.rs e65c5f0eb3 depreciate the render macro 1 éve
control_focus.rs e65c5f0eb3 depreciate the render macro 1 éve
counter.rs d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
crm.rs e65c5f0eb3 depreciate the render macro 1 éve
custom_assets.rs b8adfb9293 Make magnansis a feature for examples 1 éve
custom_html.rs d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
disabled.rs e65c5f0eb3 depreciate the render macro 1 éve
dog_app.rs e65c5f0eb3 depreciate the render macro 1 éve
dynamic_asset.rs e65c5f0eb3 depreciate the render macro 1 éve
error_handle.rs e65c5f0eb3 depreciate the render macro 1 éve
eval.rs e65c5f0eb3 depreciate the render macro 1 éve
file_explorer.rs d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
file_upload.rs e65c5f0eb3 depreciate the render macro 1 éve
filedragdrop.rs d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
flat_router.rs d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
form.rs e65c5f0eb3 depreciate the render macro 1 éve
generic_component.rs e65c5f0eb3 depreciate the render macro 1 éve
hello_world.rs e65c5f0eb3 depreciate the render macro 1 éve
hydration.rs d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
inputs.rs e65c5f0eb3 depreciate the render macro 1 éve
link.rs e65c5f0eb3 depreciate the render macro 1 éve
login_form.rs e65c5f0eb3 depreciate the render macro 1 éve
multiwindow.rs e65c5f0eb3 depreciate the render macro 1 éve
nested_listeners.rs e65c5f0eb3 depreciate the render macro 1 éve
optional_props.rs 1b65ee8501 Tweak launch cfg 1 éve
overlay.rs d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
pattern_model.rs d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
pattern_reducer.rs e65c5f0eb3 depreciate the render macro 1 éve
read_size.rs d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
readme.rs e65c5f0eb3 depreciate the render macro 1 éve
router.rs 1df329bda4 Fix router examples 1 éve
rsx_usage.rs e65c5f0eb3 depreciate the render macro 1 éve
scroll_to_top.rs e65c5f0eb3 depreciate the render macro 1 éve
shortcut.rs e65c5f0eb3 depreciate the render macro 1 éve
shorthand.rs e65c5f0eb3 depreciate the render macro 1 éve
signals.rs e65c5f0eb3 depreciate the render macro 1 éve
simple_desktop.rs 3506b3ea72 Make http a required feature for a number of examples 1 éve
simple_list.rs e65c5f0eb3 depreciate the render macro 1 éve
simple_router.rs b165d707c4 Merge branch 'breaking' of https://github.com/Demonthos/dioxus into breaking 1 éve
spread.rs e65c5f0eb3 depreciate the render macro 1 éve
ssr.rs e65c5f0eb3 depreciate the render macro 1 éve
streams.rs e65c5f0eb3 depreciate the render macro 1 éve
suspense.rs d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
svg.rs e65c5f0eb3 depreciate the render macro 1 éve
svg_basic.rs e65c5f0eb3 depreciate the render macro 1 éve
tasks.rs e65c5f0eb3 depreciate the render macro 1 éve
textarea.rs e65c5f0eb3 depreciate the render macro 1 éve
todomvc.rs e65c5f0eb3 depreciate the render macro 1 éve
video_stream.rs e65c5f0eb3 depreciate the render macro 1 éve
web_component.rs e65c5f0eb3 depreciate the render macro 1 éve
window_event.rs d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
window_focus.rs d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 1 éve
window_zoom.rs e65c5f0eb3 depreciate the render macro 1 éve
xss_safety.rs e65c5f0eb3 depreciate the render macro 1 éve

README.md

Examples

These examples are fully-fledged mini Dioxus apps.

You can run them with cargo run --example EXAMPLE_NAME. Example:

cargo run --example hello_world

(Most of these examples are run through webview, so you don't need the Dioxus CLI installed)

Basic Features

hello_world - Most basic example

readme - Counter example from the Readme

custom_assets - Include images

custom_html - Customize wrapper HTML

eval - Evaluate JS expressions

RSX

rsx_usage - Demo of all RSX features

xss_safety - You can include text without worrying about injections by default

Props

borrowed - Borrowed props

inlineprops - Demo of inline_props macro

optional_props - Optional props

CSS

all_css - You can specify any CSS attribute

tailwind - You can use a library for styling

Input Handling

all_events - Basic event handling demo

filedragdrop - Handle dropped files

form - Handle form submission

inputs - Input values

nested_listeners - Nested handlers and bubbling

textarea - Text area input

State Management

fermi - Fermi library for state management

pattern_reducer - The reducer pattern with use_state

rsx_compile_fail

Async

login_form - Login endpoint example

suspense - Render placeholders while data is loading

tasks - Continuously run future

SVG

svg_basic

svg

Performance

framework_benchmark - Renders a huge list

Note: The benchmark should be run in release mode:

cargo run --example framework_benchmark --release

heavy_compute - How to deal with expensive operations

Server-side rendering

ssr - Rendering RSX server-side

hydration - Pre-rendering with hydration

Common Patterns

disabled - Disable buttons conditionally

error_handle - Handle errors with early return

Routing

flat_router - Basic, flat route example

router - Router example

link - Internal, external and custom links

Platform Features

window_event - Window decorations, fullscreen, minimization, etc.

window_zoom – Zoom in or out

Example Apps

calculator - Simple calculator

pattern_model - Simple calculator, but using a custom struct as the model

crm - Toy multi-page customer management app

dog_app - Accesses dog API

file_explorer - File browser that uses use_ref to interact with the model

todomvc - Todo task list example

TODO

Missing Features

  • Fine-grained reactivity
  • Refs - imperative handles to elements
  • Function-driven children: Pass functions to make VNodes

Missing examples

  • Shared state
  • Root-less element groups
  • Custom elements
  • Component Children: Pass children into child components
  • Render To string: Render a mounted virtualdom to a string
  • Testing and Debugging