Jonathan Kelley d3f6ff703c Release 0.4.3 1 ano atrás
..
PWA-example 95887e836c fix: Add the --locked param to every cli installation command (#1427) 1 ano atrás
assets c113d96bbe fix: Update logos and custom assets example (#960) 2 anos atrás
mobile_demo 9f7a0a9f63 chore: `tauri-mobile` -> `cargo-mobile2` (#1518) 1 ano atrás
openid_connect_demo ab1fab5f50 No publish demos 1 ano atrás
query_segments_demo ab1fab5f50 No publish demos 1 ano atrás
tailwind d3f6ff703c Release 0.4.3 1 ano atrás
README.md 2b47602c27 Update README.md 2 anos atrás
all_css.rs b182a6ee75 chore: clean up interpreter and bindings 2 anos atrás
all_events.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy 2 anos atrás
borrowed.rs b182a6ee75 chore: clean up interpreter and bindings 2 anos atrás
button.rs 14a1039808 make clippy happy 2 anos atrás
calculator.rs 62719c309a fix keyboard input on calc example (#1639) 1 ano atrás
callback.rs b6c7d44a27 fix clippy 2 anos atrás
clock.rs 14c852010b restore clock example 1 ano atrás
compose.rs c4a18bc24d chore: clean up some clippy warnings and add clippy lints to CI 2 anos atrás
control_focus.rs 19436e210f Merge branch 'upstream' into query-system 2 anos atrás
counter.rs 9571adea30 add counter example 2 anos atrás
crm.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) 1 ano atrás
custom_assets.rs c113d96bbe fix: Update logos and custom assets example (#960) 2 anos atrás
custom_html.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) 2 anos atrás
disabled.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy 2 anos atrás
dog_app.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) 1 ano atrás
drops.rs c6d4398e36 make clippy happy 2 anos atrás
error_handle.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) 1 ano atrás
eval.rs 6210c6fefe Convert use_eval to use send/recv system (#1080) 1 ano atrás
fermi.rs 535435a4cf Fix the issue of duplicate unique ID for atoms using `newtype`. 2 anos atrás
file_explorer.rs b6c7d44a27 fix clippy 2 anos atrás
file_upload.rs e39d8708fa Changed `directory` to `webkitdirectory` in `bool_attrs` definitions. 1 ano atrás
filedragdrop.rs b6c7d44a27 fix clippy 2 anos atrás
flat_router.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) 1 ano atrás
form.rs d9546d9504 Renderers are now packages, not features. (#387) 3 anos atrás
framework_benchmark.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy 2 anos atrás
generic_component.rs 425d8c64dd use the generic parameter in the generic component example 2 anos atrás
heavy_compute.rs d9546d9504 Renderers are now packages, not features. (#387) 3 anos atrás
hello_world.rs d9546d9504 Renderers are now packages, not features. (#387) 3 anos atrás
hydration.rs d637ef187c fix all broken examples (#1248) 1 ano atrás
inlineprops.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) 1 ano atrás
inputs.rs ca0e1fb9ab added select element example 2 anos atrás
link.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) 1 ano atrás
login_form.rs f7017fac2e Fix the login form example 1 ano atrás
multiwindow.rs c4a18bc24d chore: clean up some clippy warnings and add clippy lints to CI 2 anos atrás
nested_listeners.rs c8f88b6428 Fix typo (#702) 2 anos atrás
optional_props.rs d9546d9504 Renderers are now packages, not features. (#387) 3 anos atrás
overlay.rs c4a18bc24d chore: clean up some clippy warnings and add clippy lints to CI 2 anos atrás
pattern_model.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy 2 anos atrás
pattern_reducer.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy 2 anos atrás
read_size.rs e7a9161066 fix link component 1 ano atrás
readme.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy 2 anos atrás
router.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) 1 ano atrás
rsx_compile_fail.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy 2 anos atrás
rsx_usage.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) 1 ano atrás
scroll_to_top.rs a551c0fcb8 add examples for onmounted 2 anos atrás
shared_state.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) 1 ano atrás
shortcut.rs 6512c153dd Fix merge errors 2 anos atrás
signals.rs 9cdbf81a4b fix clippy lint 1 ano atrás
simple_desktop.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) 1 ano atrás
simple_list.rs 6c677e64da chore: make for loops not the same 2 anos atrás
simple_router.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) 1 ano atrás
ssr.rs b6c7d44a27 fix clippy 2 anos atrás
suspense.rs d637ef187c fix all broken examples (#1248) 1 ano atrás
svg.rs b4af761038 fix rng in svg dice example (#970) 2 anos atrás
svg_basic.rs d160f38bc2 fix: parsing of attributes without trailing commas 2 anos atrás
tasks.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy 2 anos atrás
textarea.rs b6c7d44a27 fix clippy 2 anos atrás
todomvc.rs 37c6c67a17 refactor todo mvc example (#1556) 1 ano atrás
web_component.rs 03413a68ab fix formatting 2 anos atrás
window_event.rs c8f88b6428 Fix typo (#702) 2 anos atrás
window_focus.rs 44025db5b0 add to example 2 anos atrás
window_zoom.rs 972084ee32 chore: clean up zoom example 2 anos atrás
xss_safety.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy 2 anos atrás

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
  • Spread props
  • Custom elements
  • Component Children: Pass children into child components
  • Render To string: Render a mounted virtualdom to a string
  • Testing and Debugging