Jonathan Kelley c5096ff5bc add gitignore to tailwind пре 1 година
..
PWA-example 0ae0929691 fix: some simple formatting and version numbers пре 1 година
assets cfc119cce2 Update more examples, add css for more examples пре 1 година
mobile_demo 85c7c22619 Make router work on web пре 1 година
openid_connect_demo 6818bbe10a Make use_future take an impl FnMut + 'static, don't include router prelude when we don't need to пре 1 година
tailwind c5096ff5bc add gitignore to tailwind пре 1 година
README.md b7cc7438eb update readme to remove dead examples пре 1 година
all_events.rs cdae3d67f7 Make clippy happy on examples пре 1 година
backgrounded_futures.rs bdbae8ccb0 Update examples, add css пре 1 година
calculator.rs bdbae8ccb0 Update examples, add css пре 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 bdbae8ccb0 Update examples, add css пре 1 година
disabled.rs bdbae8ccb0 Update examples, add css пре 1 година
dog_app.rs bdbae8ccb0 Update examples, add css пре 1 година
dynamic_asset.rs bdbae8ccb0 Update examples, add css пре 1 година
error_handle.rs bdbae8ccb0 Update examples, add css пре 1 година
eval.rs cbadea022a Eval should never return an error пре 1 година
file_explorer.rs bdbae8ccb0 Update examples, add css пре 1 година
file_upload.rs bdbae8ccb0 Update examples, add css пре 1 година
flat_router.rs bdbae8ccb0 Update examples, add css пре 1 година
form.rs bdbae8ccb0 Update examples, add css пре 1 година
future.rs bdbae8ccb0 Update examples, add css пре 1 година
generic_component.rs bdbae8ccb0 Update examples, add css пре 1 година
global.rs bdbae8ccb0 Update examples, add css пре 1 година
hello_world.rs bdbae8ccb0 Update examples, add css пре 1 година
hydration.rs 85c7c22619 Make router work on web пре 1 година
image_generator_openai.rs f9eabbe8ef clippy!! пре 1 година
link.rs bdbae8ccb0 Update examples, add css пре 1 година
login_form.rs bdbae8ccb0 Update examples, add css пре 1 година
memo_chain.rs bdbae8ccb0 Update examples, add css пре 1 година
multiwindow.rs bdbae8ccb0 Update examples, add css пре 1 година
nested_listeners.rs 3ded0f5329 Make more examples cross-platform пре 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_segments.rs 6818bbe10a Make use_future take an impl FnMut + 'static, don't include router prelude when we don't need to пре 1 година
read_size.rs cfc119cce2 Update more examples, add css for more examples пре 1 година
readme.rs cfc119cce2 Update more examples, add css for more examples пре 1 година
reducer.rs cfc119cce2 Update more examples, add css for more examples пре 1 година
router.rs cfc119cce2 Update more examples, add css for more examples пре 1 година
rsx_usage.rs 72bef223cd Fix rsx_usage example пре 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 cfc119cce2 Update more examples, add css for more examples пре 1 година
spread.rs cfc119cce2 Update more examples, add css for more examples пре 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 cfc119cce2 Update more examples, add css for more examples пре 1 година
svg.rs cfc119cce2 Update more examples, add css for more examples пре 1 година
todomvc.rs bdbae8ccb0 Update examples, add css пре 1 година
video_stream.rs cfc119cce2 Update more examples, add css for more examples пре 1 година
weather_app.rs 89ae287fed add weather_app to examples, update for 0.5 пре 1 година
web_component.rs bdbae8ccb0 Update examples, add css пре 1 година
window_event.rs bdbae8ccb0 Update examples, add css пре 1 година
window_focus.rs bdbae8ccb0 Update examples, add css пре 1 година
window_zoom.rs bdbae8ccb0 Update examples, add css пре 1 година
xss_safety.rs e65c5f0eb3 depreciate the render macro пре 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

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