Jonathan Kelley fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
..
PWA-example fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
assets c113d96bbe fix: Update logos and custom assets example (#960) 2 anos atrás
mobile_demo fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
openid_connect_demo fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
query_segments_demo fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
tailwind fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
README.md ee25c03e74 fix some clippy lints 1 ano atrás
all_css.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
all_events.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
calculator.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
callback.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
clock.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
compose.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
control_focus.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
counter.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
crm.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
custom_assets.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
custom_html.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
disabled.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
dog_app.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
drops.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
dynamic_asset.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
error_handle.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
eval.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
fermi.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
file_explorer.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
file_upload.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
filedragdrop.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
flat_router.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
form.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
framework_benchmark.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
generic_component.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
heavy_compute.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
hello_world.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
hydration.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
inlineprops.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
inputs.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
link.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
login_form.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
multiwindow.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
nested_listeners.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
optional_props.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
overlay.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
pattern_model.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
pattern_reducer.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
read_size.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
readme.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
router.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
rsx_compile_fail.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
rsx_usage.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
scroll_to_top.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
shared_state.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
shortcut.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
shorthand.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
signals.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
simple_desktop.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
simple_list.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
simple_router.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
spread.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
ssr.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
streams.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
suspense.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
svg.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
svg_basic.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
tasks.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
textarea.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
todomvc.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
video_stream.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
web_component.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
window_event.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
window_focus.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
window_zoom.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás
xss_safety.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 ano atrás

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