Jonathan Kelley 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
..
PWA-example 1dde044697 remove cx.render 1 gadu atpakaļ
assets c113d96bbe fix: Update logos and custom assets example (#960) 2 gadi atpakaļ
mobile_demo fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 gadu atpakaļ
openid_connect_demo 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
query_segments_demo fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 gadu atpakaļ
tailwind 1dde044697 remove cx.render 1 gadu atpakaļ
README.md ee25c03e74 fix some clippy lints 1 gadu atpakaļ
all_css.rs 1dde044697 remove cx.render 1 gadu atpakaļ
all_events.rs 1dde044697 remove cx.render 1 gadu atpakaļ
calculator.rs fe12b1062f Clean up more examples 1 gadu atpakaļ
clock.rs 1dde044697 remove cx.render 1 gadu atpakaļ
compose.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
control_focus.rs 6134a2ce24 Clean up a number of examples 1 gadu atpakaļ
counter.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
crm.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
custom_assets.rs 1dde044697 remove cx.render 1 gadu atpakaļ
custom_html.rs 1dde044697 remove cx.render 1 gadu atpakaļ
disabled.rs 6134a2ce24 Clean up a number of examples 1 gadu atpakaļ
dog_app.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
dynamic_asset.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 gadu atpakaļ
error_handle.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
eval.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
file_explorer.rs fe12b1062f Clean up more examples 1 gadu atpakaļ
file_upload.rs 6134a2ce24 Clean up a number of examples 1 gadu atpakaļ
filedragdrop.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
flat_router.rs 6134a2ce24 Clean up a number of examples 1 gadu atpakaļ
form.rs 1dde044697 remove cx.render 1 gadu atpakaļ
generic_component.rs fe12b1062f Clean up more examples 1 gadu atpakaļ
heavy_compute.rs 1dde044697 remove cx.render 1 gadu atpakaļ
hello_world.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 gadu atpakaļ
hydration.rs 6134a2ce24 Clean up a number of examples 1 gadu atpakaļ
inputs.rs 1dde044697 remove cx.render 1 gadu atpakaļ
link.rs 1dde044697 remove cx.render 1 gadu atpakaļ
login_form.rs 1dde044697 remove cx.render 1 gadu atpakaļ
multiwindow.rs 1dde044697 remove cx.render 1 gadu atpakaļ
nested_listeners.rs 1dde044697 remove cx.render 1 gadu atpakaļ
optional_props.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
overlay.rs 1dde044697 remove cx.render 1 gadu atpakaļ
pattern_model.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
pattern_reducer.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
read_size.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
readme.rs 1dde044697 remove cx.render 1 gadu atpakaļ
router.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 gadu atpakaļ
rsx_usage.rs fe12b1062f Clean up more examples 1 gadu atpakaļ
scroll_to_top.rs 6134a2ce24 Clean up a number of examples 1 gadu atpakaļ
shortcut.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
shorthand.rs 1dde044697 remove cx.render 1 gadu atpakaļ
signals.rs 1dde044697 remove cx.render 1 gadu atpakaļ
simple_desktop.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
simple_list.rs 1dde044697 remove cx.render 1 gadu atpakaļ
simple_router.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
spread.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
ssr.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
streams.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
suspense.rs 74aa55f85f Bring back mroe hooks, remove old hooks, cleanup a number of examples 1 gadu atpakaļ
svg.rs bb6aa9e792 Add back ondestroy hook 1 gadu atpakaļ
svg_basic.rs 6134a2ce24 Clean up a number of examples 1 gadu atpakaļ
tasks.rs f2caa3a3ad clean up some more examples 1 gadu atpakaļ
textarea.rs 1dde044697 remove cx.render 1 gadu atpakaļ
todomvc.rs 6134a2ce24 Clean up a number of examples 1 gadu atpakaļ
video_stream.rs fae0b08e61 Fix the router and stub out a number of crates to get compiling 1 gadu atpakaļ
web_component.rs 1dde044697 remove cx.render 1 gadu atpakaļ
window_event.rs 6134a2ce24 Clean up a number of examples 1 gadu atpakaļ
window_focus.rs 6134a2ce24 Clean up a number of examples 1 gadu atpakaļ
window_zoom.rs 6134a2ce24 Clean up a number of examples 1 gadu atpakaļ
xss_safety.rs 1dde044697 remove cx.render 1 gadu atpakaļ

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