Jonathan Kelley 1df329bda4 Fix router examples 1 rok pred
..
PWA-example e65c5f0eb3 depreciate the render macro 1 rok pred
assets c113d96bbe fix: Update logos and custom assets example (#960) 2 rokov pred
mobile_demo e65c5f0eb3 depreciate the render macro 1 rok pred
openid_connect_demo e65c5f0eb3 depreciate the render macro 1 rok pred
query_segments_demo b58eb04278 Fix basic routers 1 rok pred
tailwind e65c5f0eb3 depreciate the render macro 1 rok pred
README.md ee25c03e74 fix some clippy lints 1 rok pred
all_css.rs e65c5f0eb3 depreciate the render macro 1 rok pred
all_events.rs e65c5f0eb3 depreciate the render macro 1 rok pred
calculator.rs e65c5f0eb3 depreciate the render macro 1 rok pred
clock.rs e65c5f0eb3 depreciate the render macro 1 rok pred
compose.rs e65c5f0eb3 depreciate the render macro 1 rok pred
control_focus.rs e65c5f0eb3 depreciate the render macro 1 rok pred
counter.rs 701093ede5 Try to rerun all dirty scopes before polling any tasks to fix effect ordering 1 rok pred
crm.rs e65c5f0eb3 depreciate the render macro 1 rok pred
custom_assets.rs e65c5f0eb3 depreciate the render macro 1 rok pred
custom_html.rs e65c5f0eb3 depreciate the render macro 1 rok pred
disabled.rs e65c5f0eb3 depreciate the render macro 1 rok pred
dog_app.rs e65c5f0eb3 depreciate the render macro 1 rok pred
dynamic_asset.rs e65c5f0eb3 depreciate the render macro 1 rok pred
error_handle.rs e65c5f0eb3 depreciate the render macro 1 rok pred
eval.rs e65c5f0eb3 depreciate the render macro 1 rok pred
file_explorer.rs e65c5f0eb3 depreciate the render macro 1 rok pred
file_upload.rs e65c5f0eb3 depreciate the render macro 1 rok pred
filedragdrop.rs e65c5f0eb3 depreciate the render macro 1 rok pred
flat_router.rs 1df329bda4 Fix router examples 1 rok pred
form.rs e65c5f0eb3 depreciate the render macro 1 rok pred
generic_component.rs e65c5f0eb3 depreciate the render macro 1 rok pred
hello_world.rs e65c5f0eb3 depreciate the render macro 1 rok pred
hydration.rs e65c5f0eb3 depreciate the render macro 1 rok pred
inputs.rs e65c5f0eb3 depreciate the render macro 1 rok pred
link.rs e65c5f0eb3 depreciate the render macro 1 rok pred
login_form.rs e65c5f0eb3 depreciate the render macro 1 rok pred
multiwindow.rs e65c5f0eb3 depreciate the render macro 1 rok pred
nested_listeners.rs e65c5f0eb3 depreciate the render macro 1 rok pred
optional_props.rs e65c5f0eb3 depreciate the render macro 1 rok pred
overlay.rs e65c5f0eb3 depreciate the render macro 1 rok pred
pattern_model.rs e65c5f0eb3 depreciate the render macro 1 rok pred
pattern_reducer.rs e65c5f0eb3 depreciate the render macro 1 rok pred
read_size.rs e65c5f0eb3 depreciate the render macro 1 rok pred
readme.rs e65c5f0eb3 depreciate the render macro 1 rok pred
router.rs 1df329bda4 Fix router examples 1 rok pred
rsx_usage.rs e65c5f0eb3 depreciate the render macro 1 rok pred
scroll_to_top.rs e65c5f0eb3 depreciate the render macro 1 rok pred
shortcut.rs e65c5f0eb3 depreciate the render macro 1 rok pred
shorthand.rs e65c5f0eb3 depreciate the render macro 1 rok pred
signals.rs e65c5f0eb3 depreciate the render macro 1 rok pred
simple_desktop.rs 1df329bda4 Fix router examples 1 rok pred
simple_list.rs e65c5f0eb3 depreciate the render macro 1 rok pred
simple_router.rs 1df329bda4 Fix router examples 1 rok pred
spread.rs e65c5f0eb3 depreciate the render macro 1 rok pred
ssr.rs e65c5f0eb3 depreciate the render macro 1 rok pred
streams.rs e65c5f0eb3 depreciate the render macro 1 rok pred
suspense.rs e65c5f0eb3 depreciate the render macro 1 rok pred
svg.rs e65c5f0eb3 depreciate the render macro 1 rok pred
svg_basic.rs e65c5f0eb3 depreciate the render macro 1 rok pred
tasks.rs e65c5f0eb3 depreciate the render macro 1 rok pred
textarea.rs e65c5f0eb3 depreciate the render macro 1 rok pred
todomvc.rs e65c5f0eb3 depreciate the render macro 1 rok pred
video_stream.rs e65c5f0eb3 depreciate the render macro 1 rok pred
web_component.rs e65c5f0eb3 depreciate the render macro 1 rok pred
window_event.rs e65c5f0eb3 depreciate the render macro 1 rok pred
window_focus.rs e65c5f0eb3 depreciate the render macro 1 rok pred
window_zoom.rs e65c5f0eb3 depreciate the render macro 1 rok pred
xss_safety.rs e65c5f0eb3 depreciate the render macro 1 rok pred

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