Jonathan Kelley f9f902732b Fix: update wry, tao, to fix android issues 1 år sedan
..
PWA-example 0ae0929691 fix: some simple formatting and version numbers 1 år sedan
assets 4b2e426958 clippy, and don't hash invisible files for ts generation 1 år sedan
mobile_demo f9f902732b Fix: update wry, tao, to fix android issues 1 år sedan
openid_connect_demo 8eda67ecb2 added hot-reload as config option with default to true (#2024) 1 år sedan
tailwind c5096ff5bc add gitignore to tailwind 1 år sedan
README.md b7cc7438eb update readme to remove dead examples 1 år sedan
all_events.rs cdae3d67f7 Make clippy happy on examples 1 år sedan
backgrounded_futures.rs bdbae8ccb0 Update examples, add css 1 år sedan
calculator.rs bdbae8ccb0 Update examples, add css 1 år sedan
calculator_mutable.rs bdbae8ccb0 Update examples, add css 1 år sedan
clock.rs bdbae8ccb0 Update examples, add css 1 år sedan
control_focus.rs bdbae8ccb0 Update examples, add css 1 år sedan
counters.rs bdbae8ccb0 Update examples, add css 1 år sedan
crm.rs bdbae8ccb0 Update examples, add css 1 år sedan
custom_assets.rs bdbae8ccb0 Update examples, add css 1 år sedan
custom_html.rs bdbae8ccb0 Update examples, add css 1 år sedan
disabled.rs bdbae8ccb0 Update examples, add css 1 år sedan
dog_app.rs 60a84956d1 restore lifetime checking for signals 1 år sedan
dynamic_asset.rs bdbae8ccb0 Update examples, add css 1 år sedan
error_handle.rs fe2c17f792 Make Clippy happy 1 år sedan
eval.rs cbadea022a Eval should never return an error 1 år sedan
file_explorer.rs bdbae8ccb0 Update examples, add css 1 år sedan
file_upload.rs 81f38a0bc5 cfg out globalhotkey 1 år sedan
flat_router.rs bdbae8ccb0 Update examples, add css 1 år sedan
form.rs 4b2e426958 clippy, and don't hash invisible files for ts generation 1 år sedan
future.rs 70136b22ea Fix error in examples/future.rs comments, use_futures inline docs comments, also added clarification that Signal<T>.read() and Singal<T>() are the same thing 1 år sedan
generic_component.rs bdbae8ccb0 Update examples, add css 1 år sedan
global.rs bdbae8ccb0 Update examples, add css 1 år sedan
hello_world.rs bdbae8ccb0 Update examples, add css 1 år sedan
hydration.rs 85c7c22619 Make router work on web 1 år sedan
image_generator_openai.rs bb5ecd779f clean up some examples, ensuring stuff works 1 år sedan
link.rs bdbae8ccb0 Update examples, add css 1 år sedan
login_form.rs bdbae8ccb0 Update examples, add css 1 år sedan
memo_chain.rs da4d9c70e8 fix memo chain example 1 år sedan
multiwindow.rs bdbae8ccb0 Update examples, add css 1 år sedan
nested_listeners.rs 3ded0f5329 Make more examples cross-platform 1 år sedan
optional_props.rs cdae3d67f7 Make clippy happy on examples 1 år sedan
overlay.rs cdae3d67f7 Make clippy happy on examples 1 år sedan
popup.rs bdbae8ccb0 Update examples, add css 1 år sedan
query_segments.rs 6818bbe10a Make use_future take an impl FnMut + 'static, don't include router prelude when we don't need to 1 år sedan
read_size.rs cfc119cce2 Update more examples, add css for more examples 1 år sedan
readme.rs 3a21ac5710 remove repetitive words (#2046) 1 år sedan
reducer.rs cfc119cce2 Update more examples, add css for more examples 1 år sedan
router.rs f7f416ee3a Fix hydration 1 år sedan
rsx_usage.rs 72bef223cd Fix rsx_usage example 1 år sedan
scroll_to_top.rs cfc119cce2 Update more examples, add css for more examples 1 år sedan
shortcut.rs cfc119cce2 Update more examples, add css for more examples 1 år sedan
shorthand.rs cfc119cce2 Update more examples, add css for more examples 1 år sedan
signals.rs cfc119cce2 Update more examples, add css for more examples 1 år sedan
simple_list.rs cfc119cce2 Update more examples, add css for more examples 1 år sedan
simple_router.rs cfc119cce2 Update more examples, add css for more examples 1 år sedan
spread.rs cfc119cce2 Update more examples, add css for more examples 1 år sedan
ssr.rs cfc119cce2 Update more examples, add css for more examples 1 år sedan
streams.rs cfc119cce2 Update more examples, add css for more examples 1 år sedan
suspense.rs 60a84956d1 restore lifetime checking for signals 1 år sedan
svg.rs cfc119cce2 Update more examples, add css for more examples 1 år sedan
todomvc.rs bb5ecd779f clean up some examples, ensuring stuff works 1 år sedan
video_stream.rs cfc119cce2 Update more examples, add css for more examples 1 år sedan
weather_app.rs bb5ecd779f clean up some examples, ensuring stuff works 1 år sedan
web_component.rs bdbae8ccb0 Update examples, add css 1 år sedan
window_event.rs bdbae8ccb0 Update examples, add css 1 år sedan
window_focus.rs bdbae8ccb0 Update examples, add css 1 år sedan
window_zoom.rs bdbae8ccb0 Update examples, add css 1 år sedan
xss_safety.rs bb5ecd779f clean up some examples, ensuring stuff works 1 år sedan

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

optional_props - Optional props

CSS

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

Async

login_form - Login endpoint example

suspense - Render placeholders while data is loading

tasks - Continuously run future

SVG

svg

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

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