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

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