Evan Almloff e2002d6ea4 fix clippy 1 рік тому
..
PWA-example 0ae0929691 fix: some simple formatting and version numbers 1 рік тому
assets 4b2e426958 clippy, and don't hash invisible files for ts generation 1 рік тому
mobile_demo 36f67bd5e2 update 0.4 doc links to 0.5 1 рік тому
openid_connect_demo 8eda67ecb2 added hot-reload as config option with default to true (#2024) 1 рік тому
tailwind 3cbe6ff96e Fix Outdated README.md (#2147) 1 рік тому
README.md 472031d1f5 Fix link to file_upload example 1 рік тому
all_events.rs cdae3d67f7 Make clippy happy on examples 1 рік тому
backgrounded_futures.rs bdbae8ccb0 Update examples, add css 1 рік тому
calculator.rs 86d1dba699 Check type of launch config (#2125) 1 рік тому
calculator_mutable.rs bdbae8ccb0 Update examples, add css 1 рік тому
clock.rs bdbae8ccb0 Update examples, add css 1 рік тому
control_focus.rs bdbae8ccb0 Update examples, add css 1 рік тому
counters.rs bdbae8ccb0 Update examples, add css 1 рік тому
crm.rs bdbae8ccb0 Update examples, add css 1 рік тому
custom_assets.rs bdbae8ccb0 Update examples, add css 1 рік тому
custom_html.rs 86d1dba699 Check type of launch config (#2125) 1 рік тому
custom_menu.rs 72ef58b95e Create use_muda_event_handler hook (#2367) 1 рік тому
disabled.rs bdbae8ccb0 Update examples, add css 1 рік тому
dog_app.rs 60a84956d1 restore lifetime checking for signals 1 рік тому
dynamic_asset.rs bdbae8ccb0 Update examples, add css 1 рік тому
error_handle.rs fe2c17f792 Make Clippy happy 1 рік тому
eval.rs ffe02b43c5 fix: typo (#2202) 1 рік тому
file_explorer.rs a5b4ceed39 chore: fix some typos in comments (#2340) 1 рік тому
file_upload.rs 81f38a0bc5 cfg out globalhotkey 1 рік тому
flat_router.rs bdbae8ccb0 Update examples, add css 1 рік тому
form.rs 2dc6cecf2e Fix #2043: use formvalue instead of String for forms (#2103) 1 рік тому
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 рік тому
generic_component.rs bdbae8ccb0 Update examples, add css 1 рік тому
global.rs a5b4ceed39 chore: fix some typos in comments (#2340) 1 рік тому
hash_fragment_state.rs 08da9a1253 Implement hash fragments in the router (#2320) 1 рік тому
hello_world.rs bdbae8ccb0 Update examples, add css 1 рік тому
hydration.rs 85c7c22619 Make router work on web 1 рік тому
image_generator_openai.rs bb5ecd779f clean up some examples, ensuring stuff works 1 рік тому
link.rs bdbae8ccb0 Update examples, add css 1 рік тому
login_form.rs bdbae8ccb0 Update examples, add css 1 рік тому
memo_chain.rs da4d9c70e8 fix memo chain example 1 рік тому
multiwindow.rs bdbae8ccb0 Update examples, add css 1 рік тому
nested_listeners.rs a5b4ceed39 chore: fix some typos in comments (#2340) 1 рік тому
optional_props.rs cdae3d67f7 Make clippy happy on examples 1 рік тому
overlay.rs cdae3d67f7 Make clippy happy on examples 1 рік тому
popup.rs bdbae8ccb0 Update examples, add css 1 рік тому
query_segment_search.rs 08da9a1253 Implement hash fragments in the router (#2320) 1 рік тому
read_size.rs a5b4ceed39 chore: fix some typos in comments (#2340) 1 рік тому
readme.rs 3a21ac5710 remove repetitive words (#2046) 1 рік тому
reducer.rs cfc119cce2 Update more examples, add css for more examples 1 рік тому
router.rs f7f416ee3a Fix hydration 1 рік тому
rsx_usage.rs e2002d6ea4 fix clippy 1 рік тому
scroll_to_top.rs cfc119cce2 Update more examples, add css for more examples 1 рік тому
shortcut.rs cfc119cce2 Update more examples, add css for more examples 1 рік тому
shorthand.rs cfc119cce2 Update more examples, add css for more examples 1 рік тому
signals.rs cfc119cce2 Update more examples, add css for more examples 1 рік тому
simple_list.rs cfc119cce2 Update more examples, add css for more examples 1 рік тому
simple_router.rs 44e997f7df Fix eventhandler optional (#2119) 1 рік тому
spread.rs 9c64fc4769 Fix #1938, allow explicit props 1 рік тому
ssr.rs cfc119cce2 Update more examples, add css for more examples 1 рік тому
streams.rs cfc119cce2 Update more examples, add css for more examples 1 рік тому
suspense.rs 86d1dba699 Check type of launch config (#2125) 1 рік тому
svg.rs cfc119cce2 Update more examples, add css for more examples 1 рік тому
todomvc.rs 5ce91e1bfc Fix flakey windows tests (#2332) 1 рік тому
video_stream.rs cfc119cce2 Update more examples, add css for more examples 1 рік тому
weather_app.rs bb5ecd779f clean up some examples, ensuring stuff works 1 рік тому
web_component.rs bdbae8ccb0 Update examples, add css 1 рік тому
window_event.rs bdbae8ccb0 Update examples, add css 1 рік тому
window_focus.rs 4bb807a3ce Reduce churn in window behavior 1 рік тому
window_zoom.rs bdbae8ccb0 Update examples, add css 1 рік тому
xss_safety.rs bb5ecd779f clean up some examples, ensuring stuff works 1 рік тому

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

file upload - Handle uploading 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