Jonathan Kelley 28a9dc6805 Pin assets sha to keep CI in check il y a 1 an
..
PWA-example 95887e836c fix: Add the --locked param to every cli installation command (#1427) il y a 1 an
assets c113d96bbe fix: Update logos and custom assets example (#960) il y a 2 ans
mobile_demo 9a6d745339 Refactor desktop into App type il y a 1 an
openid_connect_demo 0e3fd225a8 Merge branch 'master' into binary-protocal il y a 1 an
query_segments_demo 8f70509bc3 Merge pull request #1680 from ealmloff/derive-query-parsing il y a 1 an
tailwind 28a9dc6805 Pin assets sha to keep CI in check il y a 1 an
README.md ee25c03e74 fix some clippy lints il y a 1 an
all_css.rs b182a6ee75 chore: clean up interpreter and bindings il y a 2 ans
all_events.rs 937be8b752 fix the on double click event and depreciate ondblclick (#1743) il y a 1 an
borrowed.rs b182a6ee75 chore: clean up interpreter and bindings il y a 2 ans
calculator.rs bc857bf339 Make clippy happy il y a 1 an
callback.rs b6c7d44a27 fix clippy il y a 2 ans
clock.rs 2e9737ef57 Clean up and document the protocol handler il y a 1 an
compose.rs a95f4dfe0d fmt il y a 1 an
control_focus.rs 19436e210f Merge branch 'upstream' into query-system il y a 2 ans
counter.rs df222c121a port examples to new events il y a 1 an
crm.rs 0388a5c1f4 fix formatting il y a 1 an
custom_assets.rs 28a9dc6805 Pin assets sha to keep CI in check il y a 1 an
custom_html.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) il y a 2 ans
disabled.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy il y a 2 ans
dog_app.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) il y a 1 an
drops.rs c6d4398e36 make clippy happy il y a 2 ans
dynamic_asset.rs 347351d1ee Finish asset handler il y a 1 an
error_handle.rs 6141aeb037 polish the throw trait il y a 1 an
eval.rs dd4547d753 Feat: add global context functions il y a 1 an
fermi.rs 535435a4cf Fix the issue of duplicate unique ID for atoms using `newtype`. il y a 2 ans
file_explorer.rs 28a9dc6805 Pin assets sha to keep CI in check il y a 1 an
file_upload.rs 9c4d90350f fix merge conflicts for files il y a 1 an
filedragdrop.rs b6c7d44a27 fix clippy il y a 2 ans
flat_router.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) il y a 1 an
form.rs df222c121a port examples to new events il y a 1 an
framework_benchmark.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy il y a 2 ans
generic_component.rs 425d8c64dd use the generic parameter in the generic component example il y a 2 ans
heavy_compute.rs d9546d9504 Renderers are now packages, not features. (#387) il y a 3 ans
hello_world.rs d9546d9504 Renderers are now packages, not features. (#387) il y a 3 ans
hydration.rs d637ef187c fix all broken examples (#1248) il y a 1 an
inlineprops.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) il y a 1 an
inputs.rs ca0e1fb9ab added select element example il y a 2 ans
link.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) il y a 1 an
login_form.rs dccfba12d8 Merge branch 'master' into events-2 il y a 1 an
multiwindow.rs dd4547d753 Feat: add global context functions il y a 1 an
nested_listeners.rs c8f88b6428 Fix typo (#702) il y a 2 ans
optional_props.rs 533c7bab49 show more cases in the optional props example il y a 1 an
overlay.rs dd4547d753 Feat: add global context functions il y a 1 an
pattern_model.rs bc857bf339 Make clippy happy il y a 1 an
pattern_reducer.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy il y a 2 ans
read_size.rs e7a9161066 fix link component il y a 1 an
readme.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy il y a 2 ans
router.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) il y a 1 an
rsx_compile_fail.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy il y a 2 ans
rsx_usage.rs 8df7a7685e Merge branch 'master' into many_optional_attributes il y a 1 an
scroll_to_top.rs a551c0fcb8 add examples for onmounted il y a 2 ans
shared_state.rs 219c068283 Merge branch 'master' into events-2 il y a 1 an
shortcut.rs 6512c153dd Fix merge errors il y a 2 ans
signals.rs 9cdbf81a4b fix clippy lint il y a 1 an
simple_desktop.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) il y a 1 an
simple_list.rs 6c677e64da chore: make for loops not the same il y a 2 ans
simple_router.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) il y a 1 an
spread.rs 5b6f9d6b80 fix merge il y a 1 an
ssr.rs b6c7d44a27 fix clippy il y a 2 ans
streams.rs 6ed038e9e5 Add example of working with streams il y a 1 an
suspense.rs d637ef187c fix all broken examples (#1248) il y a 1 an
svg.rs b4af761038 fix rng in svg dice example (#970) il y a 2 ans
svg_basic.rs d160f38bc2 fix: parsing of attributes without trailing commas il y a 2 ans
tasks.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy il y a 2 ans
textarea.rs df222c121a port examples to new events il y a 1 an
todomvc.rs 28a9dc6805 Pin assets sha to keep CI in check il y a 1 an
video_stream.rs 2e0cded871 Make clippy happy il y a 1 an
web_component.rs 03413a68ab fix formatting il y a 2 ans
window_event.rs c8f88b6428 Fix typo (#702) il y a 2 ans
window_focus.rs bc857bf339 Make clippy happy il y a 1 an
window_zoom.rs dccfba12d8 Merge branch 'master' into events-2 il y a 1 an
xss_safety.rs df222c121a port examples to new events il y a 1 an

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