├── .dockerignore ├── .github └── workflows │ ├── check.yml │ ├── fly-deploy.yml │ └── gh-pages.yml ├── .gitignore ├── .vscode ├── launch.json └── settings.json ├── Cargo.lock ├── Cargo.toml ├── Dioxus.toml ├── Dockerfile ├── README.md ├── docs-src ├── 0.3 │ ├── .gitignore │ ├── SUMMARY.md │ ├── book.toml │ ├── en │ │ ├── async │ │ │ ├── index.md │ │ │ ├── spawn.md │ │ │ ├── use_coroutine.md │ │ │ └── use_future.md │ │ ├── best_practices │ │ │ ├── antipatterns.md │ │ │ ├── error_handling.md │ │ │ └── index.md │ │ ├── contributing.md │ │ ├── custom_renderer │ │ │ └── index.md │ │ ├── describing_ui │ │ │ ├── component_children.md │ │ │ ├── component_props.md │ │ │ ├── components.md │ │ │ ├── index.md │ │ │ └── special_attributes.md │ │ ├── getting_started │ │ │ ├── desktop.md │ │ │ ├── hot_reload.md │ │ │ ├── index.md │ │ │ ├── liveview.md │ │ │ ├── mobile.md │ │ │ ├── ssr.md │ │ │ ├── tui.md │ │ │ └── web.md │ │ ├── index.md │ │ ├── interactivity │ │ │ ├── custom_hooks.md │ │ │ ├── dynamic_rendering.md │ │ │ ├── event_handlers.md │ │ │ ├── hooks.md │ │ │ ├── index.md │ │ │ ├── router.md │ │ │ ├── sharing_state.md │ │ │ └── user_input.md │ │ ├── lib.rs │ │ ├── publishing │ │ │ ├── desktop.md │ │ │ ├── index.md │ │ │ └── web.md │ │ └── roadmap.md │ └── pt-br │ │ ├── SUMMARY.md │ │ ├── async │ │ ├── index.md │ │ ├── spawn.md │ │ ├── use_coroutine.md │ │ └── use_future.md │ │ ├── best_practices │ │ ├── antipatterns.md │ │ ├── error_handling.md │ │ └── index.md │ │ ├── contributing.md │ │ ├── custom_renderer │ │ └── index.md │ │ ├── describing_ui │ │ ├── component_children.md │ │ ├── component_props.md │ │ ├── components.md │ │ ├── images │ │ │ ├── component_borrowed_props_screenshot.png │ │ │ ├── component_owned_props_screenshot.png │ │ │ └── screenshot_about_component.png │ │ ├── index.md │ │ └── special_attributes.md │ │ ├── getting_started │ │ ├── desktop.md │ │ ├── hot_reload.md │ │ ├── index.md │ │ ├── mobile.md │ │ ├── ssr.md │ │ ├── tui.md │ │ └── web.md │ │ ├── images │ │ ├── compiletimecorrect.png │ │ ├── component_tree.png │ │ ├── diffing.png │ │ ├── dioxuslogo_full.png │ │ ├── oldnew.png │ │ └── publish.png │ │ ├── index.md │ │ ├── interactivity │ │ ├── custom_hooks.md │ │ ├── dynamic_rendering.md │ │ ├── event_handlers.md │ │ ├── hooks.md │ │ ├── images │ │ │ ├── counter.png │ │ │ ├── counter_two_state.png │ │ │ └── meme_editor_screenshot.png │ │ ├── index.md │ │ ├── roteador.md │ │ ├── router.md │ │ ├── sharing_state.md │ │ └── user_input.md │ │ ├── lib.rs │ │ ├── publishing │ │ ├── desktop.md │ │ ├── index.md │ │ └── web.md │ │ └── roadmap.md ├── 0.4 │ ├── SUMMARY.md │ ├── book.toml │ └── en │ │ ├── CLI │ │ ├── configure.md │ │ ├── creating.md │ │ ├── index.md │ │ ├── installation.md │ │ ├── plugin │ │ │ ├── index.md │ │ │ └── interface │ │ │ │ ├── command.md │ │ │ │ ├── dirs.md │ │ │ │ ├── log.md │ │ │ │ ├── network.md │ │ │ │ ├── os.md │ │ │ │ └── path.md │ │ └── translate.md │ │ ├── contributing │ │ ├── governance.md │ │ ├── guiding_principles.md │ │ ├── index.md │ │ ├── project_structure.md │ │ ├── roadmap.md │ │ └── walkthrough_readme.md │ │ ├── cookbook │ │ ├── antipatterns.md │ │ ├── custom_renderer.md │ │ ├── error_handling.md │ │ ├── examples.md │ │ ├── index.md │ │ ├── integrations │ │ │ ├── auth.md │ │ │ ├── database.md │ │ │ ├── index.md │ │ │ ├── internationalization.md │ │ │ └── logging.md │ │ ├── optimizing.md │ │ ├── publishing.md │ │ ├── state │ │ │ ├── custom_hooks │ │ │ │ └── index.md │ │ │ ├── external │ │ │ │ └── index.md │ │ │ └── index.md │ │ ├── tailwind.md │ │ └── testing.md │ │ ├── getting_started │ │ ├── choosing_a_web_renderer.md │ │ ├── desktop.md │ │ ├── fullstack.md │ │ ├── index.md │ │ ├── liveview.md │ │ ├── mobile.md │ │ ├── tui.md │ │ └── wasm.md │ │ ├── guide │ │ ├── data_fetching.md │ │ ├── full_code.md │ │ ├── index.md │ │ ├── state.md │ │ └── your_first_component.md │ │ ├── index.md │ │ ├── migration │ │ ├── hot_reload.md │ │ ├── index.md │ │ └── router.md │ │ ├── reference │ │ ├── component_props.md │ │ ├── components.md │ │ ├── context.md │ │ ├── desktop │ │ │ └── index.md │ │ ├── dynamic_rendering.md │ │ ├── event_handlers.md │ │ ├── fullstack │ │ │ ├── authentication.md │ │ │ ├── extractors.md │ │ │ ├── index.md │ │ │ ├── middleware.md │ │ │ ├── publishing.md │ │ │ ├── routing.md │ │ │ └── server_functions.md │ │ ├── hooks.md │ │ ├── images │ │ │ └── meme_editor_screenshot.png │ │ ├── index.md │ │ ├── liveview.md │ │ ├── memoization.md │ │ ├── mobile.md │ │ ├── router.md │ │ ├── rsx.md │ │ ├── spawn.md │ │ ├── ssr.md │ │ ├── use_coroutine.md │ │ ├── use_effect.md │ │ ├── use_future.md │ │ ├── user_input.md │ │ └── web │ │ │ └── index.md │ │ └── router │ │ ├── example │ │ ├── building-a-nest.md │ │ ├── first-route.md │ │ ├── full-code.md │ │ ├── index.md │ │ ├── navigation-targets.md │ │ └── redirection-perfection.md │ │ ├── index.md │ │ ├── lib.rs │ │ └── reference │ │ ├── history-buttons.md │ │ ├── history-providers.md │ │ ├── index.md │ │ ├── layouts.md │ │ ├── navigation │ │ ├── index.md │ │ └── programmatic.md │ │ ├── redirects.md │ │ ├── routes │ │ ├── index.md │ │ └── nested.md │ │ ├── routing-update-callback.md │ │ └── static-generation.md ├── 0.5 │ ├── book.toml │ ├── src │ │ ├── CLI │ │ │ ├── configure.md │ │ │ ├── creating.md │ │ │ ├── index.md │ │ │ └── translate.md │ │ ├── SUMMARY.md │ │ ├── contributing │ │ │ ├── governance.md │ │ │ ├── guiding_principles.md │ │ │ ├── index.md │ │ │ ├── project_structure.md │ │ │ ├── roadmap.md │ │ │ └── walkthrough_readme.md │ │ ├── cookbook │ │ │ ├── antipatterns.md │ │ │ ├── custom_renderer.md │ │ │ ├── error_handling.md │ │ │ ├── index.md │ │ │ ├── integrations │ │ │ │ ├── auth.md │ │ │ │ ├── database.md │ │ │ │ ├── index.md │ │ │ │ ├── internationalization.md │ │ │ │ └── logging.md │ │ │ ├── optimizing.md │ │ │ ├── publishing.md │ │ │ ├── state │ │ │ │ ├── custom_hooks │ │ │ │ │ └── index.md │ │ │ │ ├── external │ │ │ │ │ └── index.md │ │ │ │ └── index.md │ │ │ ├── tailwind.md │ │ │ └── testing.md │ │ ├── getting_started │ │ │ └── index.md │ │ ├── guide │ │ │ ├── data_fetching.md │ │ │ ├── full_code.md │ │ │ ├── index.md │ │ │ ├── state.md │ │ │ └── your_first_component.md │ │ ├── index.md │ │ ├── migration │ │ │ ├── fermi.md │ │ │ ├── hooks.md │ │ │ ├── index.md │ │ │ ├── props.md │ │ │ └── state.md │ │ ├── reference │ │ │ ├── assets.md │ │ │ ├── choosing_a_web_renderer.md │ │ │ ├── component_props.md │ │ │ ├── components.md │ │ │ ├── context.md │ │ │ ├── desktop │ │ │ │ └── index.md │ │ │ ├── dynamic_rendering.md │ │ │ ├── event_handlers.md │ │ │ ├── fullstack │ │ │ │ ├── authentication.md │ │ │ │ ├── extractors.md │ │ │ │ ├── index.md │ │ │ │ ├── middleware.md │ │ │ │ ├── publishing.md │ │ │ │ ├── routing.md │ │ │ │ └── server_functions.md │ │ │ ├── hooks.md │ │ │ ├── index.md │ │ │ ├── liveview.md │ │ │ ├── mobile │ │ │ │ ├── apis.md │ │ │ │ └── index.md │ │ │ ├── router.md │ │ │ ├── rsx.md │ │ │ ├── spawn.md │ │ │ ├── ssr.md │ │ │ ├── use_coroutine.md │ │ │ ├── use_effect.md │ │ │ ├── use_resource.md │ │ │ ├── user_input.md │ │ │ └── web │ │ │ │ └── index.md │ │ └── router │ │ │ ├── example │ │ │ ├── building-a-nest.md │ │ │ ├── first-route.md │ │ │ ├── full-code.md │ │ │ ├── index.md │ │ │ ├── navigation-targets.md │ │ │ └── redirection-perfection.md │ │ │ ├── index.md │ │ │ └── reference │ │ │ ├── history-buttons.md │ │ │ ├── history-providers.md │ │ │ ├── index.md │ │ │ ├── layouts.md │ │ │ ├── navigation │ │ │ ├── index.md │ │ │ └── programmatic.md │ │ │ ├── redirects.md │ │ │ ├── routes │ │ │ ├── index.md │ │ │ └── nested.md │ │ │ ├── routing-update-callback.md │ │ │ └── static-generation.md │ └── zh │ │ ├── CLI │ │ ├── configure.md │ │ ├── creating.md │ │ ├── index.md │ │ └── translate.md │ │ ├── contributing │ │ ├── governance.md │ │ ├── guiding_principles.md │ │ ├── index.md │ │ ├── project_structure.md │ │ ├── roadmap.md │ │ └── walkthrough_readme.md │ │ ├── cookbook │ │ ├── antipatterns.md │ │ ├── custom_renderer.md │ │ ├── error_handling.md │ │ ├── examples.md │ │ ├── index.md │ │ ├── integrations │ │ │ ├── auth.md │ │ │ ├── database.md │ │ │ ├── index.md │ │ │ ├── internationalization.md │ │ │ └── logging.md │ │ ├── optimizing.md │ │ ├── publishing.md │ │ ├── state │ │ │ ├── custom_hooks │ │ │ │ └── index.md │ │ │ ├── external │ │ │ │ └── index.md │ │ │ └── index.md │ │ ├── tailwind.md │ │ └── testing.md │ │ ├── getting_started │ │ └── index.md │ │ ├── guide │ │ ├── data_fetching.md │ │ ├── full_code.md │ │ ├── index.md │ │ ├── state.md │ │ └── your_first_component.md │ │ ├── index.md │ │ ├── migration │ │ ├── fermi.md │ │ ├── hooks.md │ │ ├── index.md │ │ ├── props.md │ │ └── state.md │ │ ├── reference │ │ ├── assets.md │ │ ├── choosing_a_web_renderer.md │ │ ├── component_props.md │ │ ├── components.md │ │ ├── context.md │ │ ├── desktop │ │ │ └── index.md │ │ ├── dynamic_rendering.md │ │ ├── event_handlers.md │ │ ├── fullstack │ │ │ ├── authentication.md │ │ │ ├── extractors.md │ │ │ ├── index.md │ │ │ ├── middleware.md │ │ │ ├── publishing.md │ │ │ ├── routing.md │ │ │ └── server_functions.md │ │ ├── hooks.md │ │ ├── index.md │ │ ├── liveview.md │ │ ├── mobile │ │ │ ├── apis.md │ │ │ └── index.md │ │ ├── router.md │ │ ├── rsx.md │ │ ├── spawn.md │ │ ├── ssr.md │ │ ├── tui.md │ │ ├── use_coroutine.md │ │ ├── use_effect.md │ │ ├── use_resource.md │ │ ├── user_input.md │ │ └── web │ │ │ └── index.md │ │ └── router │ │ ├── example │ │ ├── building-a-nest.md │ │ ├── first-route.md │ │ ├── full-code.md │ │ ├── index.md │ │ ├── navigation-targets.md │ │ └── redirection-perfection.md │ │ ├── index.md │ │ ├── lib.rs │ │ └── reference │ │ ├── history-buttons.md │ │ ├── history-providers.md │ │ ├── index.md │ │ ├── layouts.md │ │ ├── navigation │ │ ├── index.md │ │ └── programmatic.md │ │ ├── redirects.md │ │ ├── routes │ │ ├── index.md │ │ └── nested.md │ │ ├── routing-update-callback.md │ │ └── static-generation.md ├── 0.6 │ ├── book.toml │ └── src │ │ ├── CLI │ │ ├── configure.md │ │ ├── creating.md │ │ ├── index.md │ │ └── translate.md │ │ ├── SUMMARY.md │ │ ├── contributing │ │ ├── governance.md │ │ ├── guiding_principles.md │ │ ├── index.md │ │ ├── project_structure.md │ │ └── walkthrough_readme.md │ │ ├── cookbook │ │ ├── antipatterns.md │ │ ├── bundling.md │ │ ├── index.md │ │ ├── integrations │ │ │ ├── auth.md │ │ │ ├── database.md │ │ │ ├── index.md │ │ │ ├── internationalization.md │ │ │ └── logging.md │ │ ├── optimizing.md │ │ ├── publishing.md │ │ ├── state │ │ │ ├── custom_hooks │ │ │ │ └── index.md │ │ │ ├── external │ │ │ │ └── index.md │ │ │ └── index.md │ │ ├── tailwind.md │ │ └── testing.md │ │ ├── essentials │ │ ├── async │ │ │ └── index.md │ │ ├── breaking │ │ │ └── index.md │ │ ├── error_handling │ │ │ └── index.md │ │ ├── index.md │ │ ├── lifecycle │ │ │ └── index.md │ │ ├── rsx │ │ │ └── index.md │ │ └── state │ │ │ └── index.md │ │ ├── getting_started │ │ └── index.md │ │ ├── guide │ │ ├── assets.md │ │ ├── backend.md │ │ ├── bundle.md │ │ ├── component.md │ │ ├── data_fetching.md │ │ ├── databases.md │ │ ├── deploy.md │ │ ├── index.md │ │ ├── new_app.md │ │ ├── next_steps.md │ │ ├── routing.md │ │ ├── rsx.md │ │ ├── state.md │ │ └── tooling.md │ │ ├── guides │ │ ├── assets.md │ │ ├── desktop │ │ │ └── index.md │ │ ├── fullstack │ │ │ ├── authentication.md │ │ │ ├── axum.md │ │ │ ├── extractors.md │ │ │ ├── hydration.md │ │ │ ├── index.md │ │ │ ├── managing_dependencies.md │ │ │ ├── middleware.md │ │ │ ├── publishing.md │ │ │ ├── routing.md │ │ │ ├── server_functions.md │ │ │ └── static_site_generation.md │ │ ├── index.md │ │ ├── liveview.md │ │ ├── mobile │ │ │ ├── apis.md │ │ │ └── index.md │ │ ├── rules_of_hooks.md │ │ ├── ssr.md │ │ └── web │ │ │ └── index.md │ │ ├── index.md │ │ ├── introduction │ │ ├── resources.md │ │ └── roadmap.md │ │ ├── migration │ │ └── index.md │ │ ├── reference │ │ ├── choosing_a_web_renderer.md │ │ ├── component_props.md │ │ ├── components.md │ │ ├── context.md │ │ ├── dynamic_rendering.md │ │ ├── event_handlers.md │ │ ├── hooks.md │ │ ├── hotreload.md │ │ ├── index.md │ │ ├── router.md │ │ ├── rsx.md │ │ ├── spawn.md │ │ ├── use_coroutine.md │ │ ├── use_effect.md │ │ ├── use_resource.md │ │ └── user_input.md │ │ └── router │ │ ├── example │ │ ├── building-a-nest.md │ │ ├── first-route.md │ │ ├── full-code.md │ │ ├── index.md │ │ ├── navigation-targets.md │ │ └── redirection-perfection.md │ │ ├── index.md │ │ ├── lib.rs │ │ └── reference │ │ ├── history-buttons.md │ │ ├── history-providers.md │ │ ├── index.md │ │ ├── layouts.md │ │ ├── navigation │ │ ├── index.md │ │ └── programmatic.md │ │ ├── redirects.md │ │ ├── routes │ │ ├── index.md │ │ └── nested.md │ │ ├── routing-update-callback.md │ │ └── static-generation.md └── blog │ ├── book.toml │ └── src │ ├── SUMMARY.md │ ├── fulltime.md │ ├── introducing-dioxus.md │ ├── release-020.md │ ├── release-030.md │ ├── release-040.md │ ├── release-050.md │ ├── release-060.md │ └── templates-diffing.md ├── fly.toml ├── packages ├── docs-router │ ├── Cargo.toml │ ├── README.md │ ├── assets │ │ ├── 06_docs │ │ │ ├── android-dogapp.mp4 │ │ │ ├── default_dioxus_app.png │ │ │ ├── deploy_screenshot.png │ │ │ ├── diffing_diagram.png │ │ │ ├── dog-app-ios.mp4 │ │ │ ├── dog-asset-hotreload.mp4 │ │ │ ├── dog-save-serverfn.mp4 │ │ │ ├── dog_app_hotreload.mp4 │ │ │ ├── dog_app_styled.png │ │ │ ├── dx_new_06.mp4 │ │ │ ├── dx_serve_06.mp4 │ │ │ ├── ebou-following.png │ │ │ ├── fetch-dog.mp4 │ │ │ ├── fly-deployed.png │ │ │ ├── fly_deploy.mp4 │ │ │ ├── fly_launch.png │ │ │ ├── full-crossplatform.png │ │ │ ├── hotdog-db-view.mp4 │ │ │ ├── hotdog-desktop.png │ │ │ ├── hotdog-interactivity.mp4 │ │ │ ├── hotdog_loading.png │ │ │ ├── hotdogfull.mp4 │ │ │ ├── no_navbar.png │ │ │ ├── routeroutlet.png │ │ │ ├── serve_with_fullstack.png │ │ │ ├── server_split.png │ │ │ ├── serving_server.png │ │ │ ├── ssg_folder.png │ │ │ ├── streaming_dogs.mp4 │ │ │ └── unstyled_dog_app.png │ │ ├── 06assets │ │ │ ├── 355903878-ebcb5872-acf7-4e29-8acb-5b183b0617ca.png │ │ │ ├── Screenshot_2024-11-14_at_10.22.48_PM.png │ │ │ ├── Screenshot_2024-11-14_at_10.38.33_PM.png │ │ │ ├── Screenshot_2024-11-14_at_10.40.56_PM.png │ │ │ ├── Screenshot_2024-11-14_at_11.28.42_PM.png │ │ │ ├── Screenshot_2024-11-14_at_11.31.18_PM.png │ │ │ ├── Screenshot_2024-11-14_at_11.35.23_PM.png │ │ │ ├── Screenshot_2024-11-14_at_8.52.18_PM.png │ │ │ ├── Screenshot_2024-11-14_at_9.01.18_PM.png │ │ │ ├── Screenshot_2024-11-14_at_9.06.05_PM.png │ │ │ ├── Screenshot_2024-11-14_at_9.41.38_PM.png │ │ │ ├── Screenshot_2024-11-14_at_9.42.33_PM.png │ │ │ ├── Screenshot_2024-11-14_at_9.50.33_PM.png │ │ │ ├── Screenshot_2024-11-14_at_9.55.12_PM.png │ │ │ ├── Screenshot_2024-11-15_at_1.02.23_AM.png │ │ │ ├── Screenshot_2024-11-15_at_1.04.13_AM.png │ │ │ ├── Screenshot_2024-11-15_at_1.05.03_AM.png │ │ │ ├── autocomplete-overhaul.mp4 │ │ │ ├── breadcrumbs_shadow.png │ │ │ ├── bundled-ios-reload.mp4 │ │ │ ├── cli-new.mp4 │ │ │ ├── dogapphr2.mp4 │ │ │ ├── dxnew.mp4 │ │ │ ├── full_hr_dioxus_fast.mp4 │ │ │ ├── image.png │ │ │ ├── image1.png │ │ │ ├── interacitve_widget_shadow.png │ │ │ ├── manganis-opt.avif │ │ │ ├── native-serverfn12.mp4 │ │ │ ├── onvisible.mp4 │ │ │ ├── prop-hotreload.mp4 │ │ │ ├── streamingsuspense.mp4 │ │ │ ├── toasts.png │ │ │ ├── version_switch_shadow.png │ │ │ └── wgpu-windows.mp4 │ │ ├── blog │ │ │ ├── diffing │ │ │ │ ├── bump-alloc.png │ │ │ │ ├── elixir.jpeg │ │ │ │ └── jsframework-diffing.png │ │ │ └── release-03 │ │ │ │ ├── compiletimecorrect.png │ │ │ │ ├── component_borrowed_props_screenshot.png │ │ │ │ ├── component_owned_props_screenshot.png │ │ │ │ ├── component_tree.png │ │ │ │ ├── counter.png │ │ │ │ ├── counter_two_state.png │ │ │ │ ├── diffing.png │ │ │ │ ├── dioxuslogo_full.png │ │ │ │ ├── meme_editor_screenshot.png │ │ │ │ ├── oldnew.png │ │ │ │ ├── publish.png │ │ │ │ └── screenshot_about_component.png │ │ ├── icon.png │ │ ├── main.css │ │ ├── static │ │ │ ├── 04meme.png │ │ │ ├── Android-Dioxus-demo.png │ │ │ ├── IOS-dioxus-demo.png │ │ │ ├── Untitled.png │ │ │ ├── android-studio-device.png │ │ │ ├── android-studio-devices.png │ │ │ ├── android-studio-simulator.png │ │ │ ├── android_demo.png │ │ │ ├── android_ndk_install.png │ │ │ ├── as-build-dropdown.png │ │ │ ├── as-build-variant-menu.png │ │ │ ├── bundle.png │ │ │ ├── counter.png │ │ │ ├── dioxus-app-stack.png │ │ │ ├── dioxus-architecture-diagram.png │ │ │ ├── dxcheck.png │ │ │ ├── enum_router.png │ │ │ ├── extension.png │ │ │ ├── ferrous_wave.png │ │ │ ├── ide_autocomplete.png │ │ │ ├── ide_hover.png │ │ │ ├── ide_listener.png │ │ │ ├── ide_rsx.png │ │ │ ├── ide_selection.png │ │ │ ├── ios_demo.png │ │ │ ├── landing_1.png │ │ │ ├── landing_2.png │ │ │ ├── landing_3.png │ │ │ ├── landing_4.png │ │ │ ├── landing_5.png │ │ │ ├── meme_editor_screenshot.png │ │ │ ├── new_fetch.png │ │ │ ├── old_fetch.png │ │ │ ├── publish.png │ │ │ ├── scanner.avif │ │ │ ├── scanner.png │ │ │ ├── split_codegen.png │ │ │ ├── tailwind_desktop_app.png │ │ │ └── workspace-graph.png │ │ └── tailwind.css │ ├── build.rs │ └── src │ │ ├── desktop_dependencies.rs │ │ ├── doc_examples │ │ ├── __interactive_04.rs │ │ ├── anti_patterns.rs │ │ ├── assets.rs │ │ ├── asynchronous.rs │ │ ├── axum_integration.rs │ │ ├── boolean_attribute.rs │ │ ├── breaking_out.rs │ │ ├── building_uis_with_rsx.rs │ │ ├── catch_all.rs │ │ ├── catch_all_segments.rs │ │ ├── component_children.rs │ │ ├── component_children_inspect.rs │ │ ├── component_element_props.rs │ │ ├── component_lifecycle.rs │ │ ├── component_owned_props.rs │ │ ├── component_props_options.rs │ │ ├── component_test.rs │ │ ├── components.rs │ │ ├── conditional_rendering.rs │ │ ├── custom_assets.rs │ │ ├── custom_renderer.rs │ │ ├── dangerous_inner_html.rs │ │ ├── dynamic_route.rs │ │ ├── dynamic_segments.rs │ │ ├── error_handling.rs │ │ ├── eval.rs │ │ ├── event_click.rs │ │ ├── event_handler_prop.rs │ │ ├── event_nested.rs │ │ ├── event_prevent_default.rs │ │ ├── external_link.rs │ │ ├── first_route.rs │ │ ├── full_example.rs │ │ ├── guide_assets.rs │ │ ├── guide_backend.rs │ │ ├── guide_component.rs │ │ ├── guide_data_fetching.rs │ │ ├── guide_databases.rs │ │ ├── guide_deploy.rs │ │ ├── guide_new_app.rs │ │ ├── guide_router.rs │ │ ├── guide_rsx.rs │ │ ├── guide_state.rs │ │ ├── hackernews_async.rs │ │ ├── hackernews_complete.rs │ │ ├── hackernews_post.rs │ │ ├── hackernews_state.rs │ │ ├── hello_world.rs │ │ ├── hello_world_desktop.rs │ │ ├── hello_world_liveview.rs │ │ ├── hello_world_ssr.rs │ │ ├── hello_world_web.rs │ │ ├── history_buttons.rs │ │ ├── history_provider.rs │ │ ├── hook_test.rs │ │ ├── hooks_bad.rs │ │ ├── hooks_composed.rs │ │ ├── hooks_counter.rs │ │ ├── hooks_counter_two_state.rs │ │ ├── hooks_custom_logic.rs │ │ ├── hooks_use_signal.rs │ │ ├── hydration.rs │ │ ├── input_controlled.rs │ │ ├── input_fileengine.rs │ │ ├── input_fileengine_async.rs │ │ ├── input_fileengine_folder.rs │ │ ├── input_uncontrolled.rs │ │ ├── links.rs │ │ ├── meme_editor.rs │ │ ├── meme_editor_dark_mode.rs │ │ ├── migration.rs │ │ ├── mod.rs │ │ ├── moving_state_around.rs │ │ ├── navigator.rs │ │ ├── nest.rs │ │ ├── nested_routes.rs │ │ ├── outlet.rs │ │ ├── query_segments.rs │ │ ├── reactivity.rs │ │ ├── readme.rs │ │ ├── rendering_lists.rs │ │ ├── router_cfg.rs │ │ ├── router_reference.rs │ │ ├── routing_update.rs │ │ ├── rsx_overview.rs │ │ ├── server_basic.rs │ │ ├── server_data_fetch.rs │ │ ├── server_data_prefetch.rs │ │ ├── server_function.rs │ │ ├── server_function_desktop_client.rs │ │ ├── server_function_extract.rs │ │ ├── server_function_middleware.rs │ │ ├── server_router.rs │ │ ├── server_tokio_import.rs │ │ ├── spawn.rs │ │ ├── ssr.rs │ │ ├── static_segments.rs │ │ ├── static_site_generation.rs │ │ ├── sync_signal.rs │ │ ├── tailwind.rs │ │ ├── untested_03 │ │ │ ├── Readme.md │ │ │ ├── anti_patterns.rs │ │ │ ├── boolean_attribute.rs │ │ │ ├── component_borrowed_props.rs │ │ │ ├── component_children.rs │ │ │ ├── component_children_inspect.rs │ │ │ ├── component_element_props.rs │ │ │ ├── component_owned_props.rs │ │ │ ├── component_props_options.rs │ │ │ ├── components.rs │ │ │ ├── conditional_rendering.rs │ │ │ ├── dangerous_inner_html.rs │ │ │ ├── event_click.rs │ │ │ ├── event_handler_prop.rs │ │ │ ├── event_nested.rs │ │ │ ├── event_prevent_default.rs │ │ │ ├── hello_world_desktop.rs │ │ │ ├── hello_world_liveview.rs │ │ │ ├── hello_world_tui.rs │ │ │ ├── hello_world_tui_no_ctrl_c.rs │ │ │ ├── hello_world_web.rs │ │ │ ├── hooks_bad.rs │ │ │ ├── hooks_composed.rs │ │ │ ├── hooks_counter.rs │ │ │ ├── hooks_counter_two_state.rs │ │ │ ├── hooks_use_ref.rs │ │ │ ├── input_controlled.rs │ │ │ ├── input_uncontrolled.rs │ │ │ ├── meme_editor.rs │ │ │ ├── meme_editor_dark_mode.rs │ │ │ ├── rendering_lists.rs │ │ │ ├── rsx_overview.rs │ │ │ ├── spawn.rs │ │ │ └── use_future.rs │ │ ├── untested_04 │ │ │ ├── anti_patterns.rs │ │ │ ├── boolean_attribute.rs │ │ │ ├── catch_all.rs │ │ │ ├── catch_all_segments.rs │ │ │ ├── component_borrowed_props.rs │ │ │ ├── component_children.rs │ │ │ ├── component_children_inspect.rs │ │ │ ├── component_element_props.rs │ │ │ ├── component_owned_props.rs │ │ │ ├── component_props_options.rs │ │ │ ├── component_test.rs │ │ │ ├── components.rs │ │ │ ├── conditional_rendering.rs │ │ │ ├── custom_assets.rs │ │ │ ├── custom_renderer.rs │ │ │ ├── dangerous_inner_html.rs │ │ │ ├── dynamic_route.rs │ │ │ ├── dynamic_segments.rs │ │ │ ├── eval.rs │ │ │ ├── event_click.rs │ │ │ ├── event_handler_prop.rs │ │ │ ├── event_nested.rs │ │ │ ├── event_prevent_default.rs │ │ │ ├── external_link.rs │ │ │ ├── first_route.rs │ │ │ ├── full_example.rs │ │ │ ├── fullstack_static.rs │ │ │ ├── hackernews_async.rs │ │ │ ├── hackernews_complete.rs │ │ │ ├── hackernews_post.rs │ │ │ ├── hackernews_state.rs │ │ │ ├── hello_world.rs │ │ │ ├── hello_world_desktop.rs │ │ │ ├── hello_world_liveview.rs │ │ │ ├── hello_world_ssr.rs │ │ │ ├── hello_world_tui.rs │ │ │ ├── hello_world_tui_no_ctrl_c.rs │ │ │ ├── hello_world_web.rs │ │ │ ├── history_buttons.rs │ │ │ ├── history_provider.rs │ │ │ ├── hook_test.rs │ │ │ ├── hooks_anti_patterns.rs │ │ │ ├── hooks_bad.rs │ │ │ ├── hooks_composed.rs │ │ │ ├── hooks_counter.rs │ │ │ ├── hooks_counter_two_state.rs │ │ │ ├── hooks_custom_logic.rs │ │ │ ├── hooks_out_of_date.rs │ │ │ ├── hooks_use_ref.rs │ │ │ ├── hydration.rs │ │ │ ├── i18n.rs │ │ │ ├── input_controlled.rs │ │ │ ├── input_fileengine.rs │ │ │ ├── input_fileengine_async.rs │ │ │ ├── input_fileengine_folder.rs │ │ │ ├── input_uncontrolled.rs │ │ │ ├── links.rs │ │ │ ├── meme_editor.rs │ │ │ ├── meme_editor_dark_mode.rs │ │ │ ├── mod.rs │ │ │ ├── navigator.rs │ │ │ ├── nest.rs │ │ │ ├── nested_routes.rs │ │ │ ├── outlet.rs │ │ │ ├── query_segments.rs │ │ │ ├── readme.rs │ │ │ ├── readme_expanded.rs │ │ │ ├── rendering_lists.rs │ │ │ ├── router_cfg.rs │ │ │ ├── routing_update.rs │ │ │ ├── rsx_overview.rs │ │ │ ├── server_basic.rs │ │ │ ├── server_data_fetch.rs │ │ │ ├── server_data_prefetch.rs │ │ │ ├── server_function.rs │ │ │ ├── server_function_desktop_client.rs │ │ │ ├── server_function_extract.rs │ │ │ ├── server_function_middleware.rs │ │ │ ├── server_router.rs │ │ │ ├── spawn.rs │ │ │ ├── static_generation.rs │ │ │ ├── static_segments.rs │ │ │ ├── use_coroutine.rs │ │ │ ├── use_coroutine_reference.rs │ │ │ └── use_future.rs │ │ ├── untested_05 │ │ │ ├── assets.rs │ │ │ ├── component_children_inspect.rs │ │ │ ├── custom_assets.rs │ │ │ ├── error_handling.rs │ │ │ ├── eval.rs │ │ │ ├── event_click.rs │ │ │ ├── event_handler_prop.rs │ │ │ ├── event_nested.rs │ │ │ ├── event_prevent_default.rs │ │ │ ├── fullstack_static.rs │ │ │ ├── history_provider.rs │ │ │ ├── hooks_bad.rs │ │ │ ├── hooks_custom_logic.rs │ │ │ ├── hydration.rs │ │ │ ├── i18n.rs │ │ │ ├── migration.rs │ │ │ ├── migration_fermi.rs │ │ │ ├── migration_hooks.rs │ │ │ ├── migration_props.rs │ │ │ ├── migration_state.rs │ │ │ ├── readme_expanded.rs │ │ │ ├── router_cfg.rs │ │ │ ├── server_function_desktop_client.rs │ │ │ ├── server_function_extract.rs │ │ │ ├── server_function_middleware.rs │ │ │ ├── spawn.rs │ │ │ ├── static_generation.rs │ │ │ ├── tailwind.rs │ │ │ └── use_coroutine_reference.rs │ │ ├── use_coroutine.rs │ │ ├── use_coroutine_reference.rs │ │ ├── use_effect.rs │ │ └── use_resource.rs │ │ ├── docs.rs │ │ ├── docs │ │ ├── .gitignore │ │ └── readme.md │ │ └── lib.rs ├── docsite │ ├── Cargo.toml │ ├── assets │ │ ├── CNAME │ │ ├── githubmarkdown.css │ │ ├── gtag.js │ │ ├── icon.png │ │ ├── main.css │ │ ├── material.css │ │ ├── static │ │ │ ├── ESA_logo.svg │ │ │ ├── airbuslogo.svg │ │ │ ├── android_ndk_installation.png │ │ │ ├── bumpframe.png │ │ │ ├── bundle_app.png │ │ │ ├── darktheme.js │ │ │ ├── dioxus-new.mp4 │ │ │ ├── docsite_cropped.avif │ │ │ ├── docsite_cropped.png │ │ │ ├── favicon.png │ │ │ ├── ferrous_wave.png │ │ │ ├── file_explorer.avif │ │ │ ├── file_explorer.png │ │ │ ├── futurewei_bw.png │ │ │ ├── images03 │ │ │ │ ├── compiletimecorrect.png │ │ │ │ ├── component_borrowed_props_screenshot.png │ │ │ │ ├── component_owned_props_screenshot.png │ │ │ │ ├── component_tree.png │ │ │ │ ├── counter.png │ │ │ │ ├── counter_two_state.png │ │ │ │ ├── diffing.png │ │ │ │ ├── dioxuslogo_full.png │ │ │ │ ├── meme_editor_screenshot.png │ │ │ │ ├── oldnew.png │ │ │ │ ├── publish.png │ │ │ │ └── screenshot_about_component.png │ │ │ ├── jsbenchmark_cropped.avif │ │ │ ├── jsbenchmark_cropped.png │ │ │ ├── marketplace_cropped.avif │ │ │ ├── marketplace_cropped.png │ │ │ ├── multiplatform-dark.svg │ │ │ ├── multiplatform-light.svg │ │ │ ├── opengraph.png │ │ │ ├── prism │ │ │ │ ├── prism.css │ │ │ │ └── prism.js │ │ │ ├── rustacean-flat-gesture.avif │ │ │ ├── satellite.webp │ │ │ ├── scanner.avif │ │ │ ├── scanner.png │ │ │ ├── smalllogo.png │ │ │ ├── todos_cropped.avif │ │ │ ├── todos_cropped.png │ │ │ ├── x_logo.png │ │ │ ├── x_logo.svg │ │ │ ├── xailogo.svg │ │ │ └── yclogo.svg │ │ ├── tailwind.config.js │ │ └── tailwind.css │ └── src │ │ ├── components.rs │ │ ├── components │ │ ├── awesome.rs │ │ ├── blog.rs │ │ ├── deploy.rs │ │ ├── footer.rs │ │ ├── homepage.rs │ │ ├── homepage │ │ │ ├── featured_examples.rs │ │ │ ├── hero.rs │ │ │ └── snippets.rs │ │ ├── learn.rs │ │ ├── llms.rs │ │ ├── nav.rs │ │ ├── notfound.rs │ │ ├── playground.rs │ │ ├── search.rs │ │ └── storage.js │ │ ├── docs.rs │ │ ├── icons.rs │ │ ├── main.rs │ │ ├── shortcut.rs │ │ └── snippets │ │ ├── async_.rs │ │ ├── components.rs │ │ ├── global.rs │ │ ├── mod.rs │ │ ├── readme.rs │ │ └── server.rs ├── include_mdbook │ ├── .github │ │ ├── FUNDING.yml │ │ ├── ISSUE_TEMPLATE │ │ │ ├── bug_report.md │ │ │ └── feature_requst.md │ │ ├── dependabot.yml │ │ └── workflows │ │ │ ├── macos.yml │ │ │ ├── main.yml │ │ │ └── windows.yml │ ├── .gitignore │ ├── README.md │ └── packages │ │ ├── mdbook-gen-example │ │ ├── Cargo.toml │ │ ├── build.rs │ │ ├── example-book │ │ │ ├── .gitignore │ │ │ ├── SUMMARY.md │ │ │ ├── assets │ │ │ │ ├── logo.png │ │ │ │ ├── logo1.png │ │ │ │ ├── logo2.png │ │ │ │ └── some.css │ │ │ ├── book.toml │ │ │ └── en │ │ │ │ ├── chapter_1.md │ │ │ │ ├── chapter_2.md │ │ │ │ └── chapter_3.md │ │ └── src │ │ │ ├── included_example.rs │ │ │ ├── lib.rs │ │ │ └── router.rs │ │ ├── mdbook-gen │ │ ├── Cargo.toml │ │ ├── src │ │ │ ├── lib.rs │ │ │ ├── rsx.rs │ │ │ └── transform_book.rs │ │ └── themes │ │ │ └── MonokaiDark.thTheme │ │ ├── mdbook-macro │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src │ │ │ └── lib.rs │ │ ├── mdbook-shared │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── book.rs │ │ │ ├── config.rs │ │ │ ├── errors.rs │ │ │ ├── lib.rs │ │ │ ├── query.rs │ │ │ └── summary.rs │ │ ├── syntect-html │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src │ │ │ └── lib.rs │ │ └── use-mdbook │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ └── src │ │ └── lib.rs ├── playground │ ├── .cargo │ │ └── config.toml │ ├── .dockerignore │ ├── .gitignore │ ├── LICENSE-APACHE │ ├── LICENSE-MIT │ ├── LICENSES │ │ ├── MATERIAL-ICONS-APACHE2 │ │ ├── MONACO-MIT │ │ ├── README.md │ │ └── SVG-SPINNERS-MIT │ ├── README.md │ ├── example-projects │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── assets │ │ │ └── main.css │ │ ├── examples │ │ │ ├── counter.rs │ │ │ └── welcome.rs │ │ └── src │ │ │ └── lib.rs │ ├── model │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── api.rs │ │ │ ├── lib.rs │ │ │ ├── project.rs │ │ │ ├── server.rs │ │ │ └── web.rs │ ├── playground │ │ ├── .vscode │ │ │ └── settings.json │ │ ├── Cargo.toml │ │ ├── assets │ │ │ ├── dxp.css │ │ │ └── monaco-editor-0.52.2 │ │ │ │ └── vs │ │ │ │ ├── base │ │ │ │ ├── browser │ │ │ │ │ └── ui │ │ │ │ │ │ └── codicons │ │ │ │ │ │ └── codicon │ │ │ │ │ │ └── codicon.ttf │ │ │ │ └── worker │ │ │ │ │ └── workerMain.js │ │ │ │ ├── basic-languages │ │ │ │ ├── abap │ │ │ │ │ └── abap.js │ │ │ │ ├── apex │ │ │ │ │ └── apex.js │ │ │ │ ├── azcli │ │ │ │ │ └── azcli.js │ │ │ │ ├── bat │ │ │ │ │ └── bat.js │ │ │ │ ├── bicep │ │ │ │ │ └── bicep.js │ │ │ │ ├── cameligo │ │ │ │ │ └── cameligo.js │ │ │ │ ├── clojure │ │ │ │ │ └── clojure.js │ │ │ │ ├── coffee │ │ │ │ │ └── coffee.js │ │ │ │ ├── cpp │ │ │ │ │ └── cpp.js │ │ │ │ ├── csharp │ │ │ │ │ └── csharp.js │ │ │ │ ├── csp │ │ │ │ │ └── csp.js │ │ │ │ ├── css │ │ │ │ │ └── css.js │ │ │ │ ├── cypher │ │ │ │ │ └── cypher.js │ │ │ │ ├── dart │ │ │ │ │ └── dart.js │ │ │ │ ├── dockerfile │ │ │ │ │ └── dockerfile.js │ │ │ │ ├── ecl │ │ │ │ │ └── ecl.js │ │ │ │ ├── elixir │ │ │ │ │ └── elixir.js │ │ │ │ ├── flow9 │ │ │ │ │ └── flow9.js │ │ │ │ ├── freemarker2 │ │ │ │ │ └── freemarker2.js │ │ │ │ ├── fsharp │ │ │ │ │ └── fsharp.js │ │ │ │ ├── go │ │ │ │ │ └── go.js │ │ │ │ ├── graphql │ │ │ │ │ └── graphql.js │ │ │ │ ├── handlebars │ │ │ │ │ └── handlebars.js │ │ │ │ ├── hcl │ │ │ │ │ └── hcl.js │ │ │ │ ├── html │ │ │ │ │ └── html.js │ │ │ │ ├── ini │ │ │ │ │ └── ini.js │ │ │ │ ├── java │ │ │ │ │ └── java.js │ │ │ │ ├── javascript │ │ │ │ │ └── javascript.js │ │ │ │ ├── julia │ │ │ │ │ └── julia.js │ │ │ │ ├── kotlin │ │ │ │ │ └── kotlin.js │ │ │ │ ├── less │ │ │ │ │ └── less.js │ │ │ │ ├── lexon │ │ │ │ │ └── lexon.js │ │ │ │ ├── liquid │ │ │ │ │ └── liquid.js │ │ │ │ ├── lua │ │ │ │ │ └── lua.js │ │ │ │ ├── m3 │ │ │ │ │ └── m3.js │ │ │ │ ├── markdown │ │ │ │ │ └── markdown.js │ │ │ │ ├── mdx │ │ │ │ │ └── mdx.js │ │ │ │ ├── mips │ │ │ │ │ └── mips.js │ │ │ │ ├── msdax │ │ │ │ │ └── msdax.js │ │ │ │ ├── mysql │ │ │ │ │ └── mysql.js │ │ │ │ ├── objective-c │ │ │ │ │ └── objective-c.js │ │ │ │ ├── pascal │ │ │ │ │ └── pascal.js │ │ │ │ ├── pascaligo │ │ │ │ │ └── pascaligo.js │ │ │ │ ├── perl │ │ │ │ │ └── perl.js │ │ │ │ ├── pgsql │ │ │ │ │ └── pgsql.js │ │ │ │ ├── php │ │ │ │ │ └── php.js │ │ │ │ ├── pla │ │ │ │ │ └── pla.js │ │ │ │ ├── postiats │ │ │ │ │ └── postiats.js │ │ │ │ ├── powerquery │ │ │ │ │ └── powerquery.js │ │ │ │ ├── powershell │ │ │ │ │ └── powershell.js │ │ │ │ ├── protobuf │ │ │ │ │ └── protobuf.js │ │ │ │ ├── pug │ │ │ │ │ └── pug.js │ │ │ │ ├── python │ │ │ │ │ └── python.js │ │ │ │ ├── qsharp │ │ │ │ │ └── qsharp.js │ │ │ │ ├── r │ │ │ │ │ └── r.js │ │ │ │ ├── razor │ │ │ │ │ └── razor.js │ │ │ │ ├── redis │ │ │ │ │ └── redis.js │ │ │ │ ├── redshift │ │ │ │ │ └── redshift.js │ │ │ │ ├── restructuredtext │ │ │ │ │ └── restructuredtext.js │ │ │ │ ├── ruby │ │ │ │ │ └── ruby.js │ │ │ │ ├── rust │ │ │ │ │ └── rust.js │ │ │ │ ├── sb │ │ │ │ │ └── sb.js │ │ │ │ ├── scala │ │ │ │ │ └── scala.js │ │ │ │ ├── scheme │ │ │ │ │ └── scheme.js │ │ │ │ ├── scss │ │ │ │ │ └── scss.js │ │ │ │ ├── shell │ │ │ │ │ └── shell.js │ │ │ │ ├── solidity │ │ │ │ │ └── solidity.js │ │ │ │ ├── sophia │ │ │ │ │ └── sophia.js │ │ │ │ ├── sparql │ │ │ │ │ └── sparql.js │ │ │ │ ├── sql │ │ │ │ │ └── sql.js │ │ │ │ ├── st │ │ │ │ │ └── st.js │ │ │ │ ├── swift │ │ │ │ │ └── swift.js │ │ │ │ ├── systemverilog │ │ │ │ │ └── systemverilog.js │ │ │ │ ├── tcl │ │ │ │ │ └── tcl.js │ │ │ │ ├── twig │ │ │ │ │ └── twig.js │ │ │ │ ├── typescript │ │ │ │ │ └── typescript.js │ │ │ │ ├── typespec │ │ │ │ │ └── typespec.js │ │ │ │ ├── vb │ │ │ │ │ └── vb.js │ │ │ │ ├── wgsl │ │ │ │ │ └── wgsl.js │ │ │ │ ├── xml │ │ │ │ │ └── xml.js │ │ │ │ └── yaml │ │ │ │ │ └── yaml.js │ │ │ │ ├── editor │ │ │ │ ├── editor.main.css │ │ │ │ └── editor.main.js │ │ │ │ ├── language │ │ │ │ ├── css │ │ │ │ │ ├── cssMode.js │ │ │ │ │ └── cssWorker.js │ │ │ │ ├── html │ │ │ │ │ ├── htmlMode.js │ │ │ │ │ └── htmlWorker.js │ │ │ │ ├── json │ │ │ │ │ ├── jsonMode.js │ │ │ │ │ └── jsonWorker.js │ │ │ │ └── typescript │ │ │ │ │ ├── tsMode.js │ │ │ │ │ └── tsWorker.js │ │ │ │ ├── loader.js │ │ │ │ ├── nls.messages.de.js │ │ │ │ ├── nls.messages.es.js │ │ │ │ ├── nls.messages.fr.js │ │ │ │ ├── nls.messages.it.js │ │ │ │ ├── nls.messages.ja.js │ │ │ │ ├── nls.messages.ko.js │ │ │ │ ├── nls.messages.ru.js │ │ │ │ ├── nls.messages.zh-cn.js │ │ │ │ └── nls.messages.zh-tw.js │ │ └── src │ │ │ ├── build.rs │ │ │ ├── components │ │ │ ├── header.rs │ │ │ ├── icons.rs │ │ │ ├── logs.rs │ │ │ ├── mod.rs │ │ │ ├── modal.rs │ │ │ └── panes.rs │ │ │ ├── editor │ │ │ ├── mod.rs │ │ │ ├── monaco.js │ │ │ └── monaco.rs │ │ │ ├── hotreload.rs │ │ │ ├── lib.rs │ │ │ ├── share_code.rs │ │ │ └── ws.rs │ ├── runner │ │ ├── Cargo.toml │ │ ├── Dioxus.toml │ │ ├── index.html │ │ └── src │ │ │ ├── main.css │ │ │ └── main.rs │ └── server │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── src │ │ ├── app.rs │ │ ├── build │ │ │ ├── builder.rs │ │ │ ├── mod.rs │ │ │ └── watcher.rs │ │ ├── main.rs │ │ ├── serve.rs │ │ ├── share.rs │ │ └── ws.rs │ │ └── template │ │ ├── .gitignore │ │ ├── snippets │ │ ├── Cargo.toml │ │ └── Dioxus.toml │ │ └── src │ │ └── .gitkeep └── search │ ├── .gitignore │ ├── README.md │ ├── search-macro │ ├── .gitignore │ ├── Cargo.toml │ └── src │ │ └── lib.rs │ ├── search-shared │ ├── .gitignore │ ├── Cargo.toml │ └── src │ │ └── lib.rs │ └── search │ ├── Cargo.toml │ └── src │ └── lib.rs └── tailwind.css /.dockerignore: -------------------------------------------------------------------------------- 1 | **/target 2 | **/dist 3 | LICENSES 4 | LICENSE 5 | temp 6 | README.md 7 | 8 | dx-debian 9 | -------------------------------------------------------------------------------- /.github/workflows/fly-deploy.yml: -------------------------------------------------------------------------------- 1 | # See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/ 2 | 3 | name: Fly Deploy 4 | 5 | on: 6 | push: 7 | branches: 8 | - main 9 | 10 | concurrency: 11 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | deploy: 16 | name: Deploy app 17 | runs-on: ubuntu-latest 18 | concurrency: deploy-group # optional: ensure only one action runs at a time 19 | steps: 20 | - uses: actions/checkout@v4 21 | - uses: superfly/flyctl-actions/setup-flyctl@master 22 | - run: flyctl deploy --remote-only 23 | env: 24 | FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.dioxus 2 | /target 3 | .DS_Store 4 | 5 | .vscode/* 6 | !.vscode/settings.json 7 | !.vscode/tasks.json 8 | !.vscode/launch.json 9 | !.vscode/extensions.json 10 | 11 | .idea 12 | .env 13 | 14 | /pkg 15 | /static 16 | /docs 17 | /dist 18 | /dioxus_search -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[html]": { 3 | // so it doesn't break code blocks 4 | "editor.formatOnSave": false 5 | }, 6 | "[css]": { 7 | "editor.formatOnSave": false 8 | }, 9 | "cSpell.words": [ 10 | "appimage", 11 | "autoplay", 12 | "binstall", 13 | "cdylib", 14 | "Cocoapod", 15 | "Cocoapods", 16 | "Dioxus", 17 | "dioxuslabs", 18 | "docsite", 19 | "eprintln", 20 | "interoperating", 21 | "interprocess", 22 | "Manganis", 23 | "onvisible", 24 | "println", 25 | "productionize", 26 | "reloadable", 27 | "Tauri", 28 | "ungating", 29 | "webassembly", 30 | "wgpu", 31 | "xbuild" 32 | ] 33 | // "editor.formatOnSave": false 34 | // "files.autoSaveDelay": 10 35 | } 36 | -------------------------------------------------------------------------------- /Dioxus.toml: -------------------------------------------------------------------------------- 1 | [application] 2 | name = "docsite" 3 | -------------------------------------------------------------------------------- /docs-src/0.3/.gitignore: -------------------------------------------------------------------------------- 1 | book/ 2 | -------------------------------------------------------------------------------- /docs-src/0.3/en/async/index.md: -------------------------------------------------------------------------------- 1 | # Working with Async 2 | 3 | Often, apps need to interact with file systems, network interfaces, hardware, or timers. This chapter provides an overview of using async code in Dioxus. 4 | 5 | ## The Runtime 6 | 7 | By default, Dioxus-Desktop ships with the `Tokio` runtime and automatically sets everything up for you. This is currently not configurable, though it would be easy to write an integration for Dioxus desktop that uses a different asynchronous runtime. 8 | 9 | Dioxus is not currently thread-safe, so any async code you write does *not* need to be `Send/Sync`. That means that you can use non-thread-safe structures like `Cell`, `Rc`, and `RefCell`. 10 | -------------------------------------------------------------------------------- /docs-src/0.3/en/best_practices/index.md: -------------------------------------------------------------------------------- 1 | # Best Practices 2 | 3 | ## Reusable Components 4 | 5 | As much as possible, break your code down into small, reusable components and hooks, instead of implementing large chunks of the UI in a single component. This will help you keep the code maintainable – it is much easier to e.g. add, remove or re-order parts of the UI if it is organized in components. 6 | 7 | Organize your components in modules to keep the codebase easy to navigate! 8 | 9 | ## Minimize State Dependencies 10 | 11 | While it is possible to share state between components, this should only be done when necessary. Any component that is associated with a particular state object needs to be re-rendered when that state changes. For this reason: 12 | 13 | - Keep state local to a component if possible 14 | - When sharing state through props, only pass down the specific data necessary 15 | -------------------------------------------------------------------------------- /docs-src/0.3/en/interactivity/index.md: -------------------------------------------------------------------------------- 1 | # Interactivity 2 | 3 | So far, we've learned how to describe the structure and properties of our user interfaces. However, most interfaces need to be interactive in order to be useful. In this chapter, we describe how to make a Dioxus app that responds to the user. 4 | -------------------------------------------------------------------------------- /docs-src/0.3/en/lib.rs: -------------------------------------------------------------------------------- 1 | // empty (we only need this crate for the examples) 2 | -------------------------------------------------------------------------------- /docs-src/0.3/en/publishing/index.md: -------------------------------------------------------------------------------- 1 | # Publishing 2 | -------------------------------------------------------------------------------- /docs-src/0.3/en/publishing/web.md: -------------------------------------------------------------------------------- 1 | ## Publishing with Github Pages 2 | To build our app and publish it to Github: 3 | 4 | - Make sure GitHub Pages is set up for your repo 5 | - Build your app with `trunk build --release` (include `--public-url ` to update asset prefixes if using a project site) 6 | - Move your generated HTML/CSS/JS/Wasm from `dist` into the folder configured for Github Pages 7 | - Add and commit with git 8 | - Push to GitHub 9 | -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/async/index.md: -------------------------------------------------------------------------------- 1 | # Trabalhando em Assincronia 2 | 3 | Muitas vezes, os aplicativos precisam interagir com sistemas de arquivos, interfaces de rede, hardware ou temporizadores. Este capítulo fornece uma visão geral do uso de código assíncrono no Dioxus. 4 | 5 | ## O Tempo de Execução (runtime) 6 | 7 | Por padrão, o Dioxus-Desktop vem com o runtime `Tokio` e configura tudo automaticamente para você. No momento, isso não é configurável, embora seja fácil escrever uma integração para o desktop Dioxus que use um tempo de execução assíncrono diferente. 8 | 9 | Dioxus atualmente não é `thread-safe`, então qualquer código assíncrono que você escreve _não_ precisa ser `Send/Sync`. Isso significa que você pode usar estruturas não `thread-safe` como `Cell`, `Rc` e `RefCell`. 10 | -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/describing_ui/images/component_borrowed_props_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.3/pt-br/describing_ui/images/component_borrowed_props_screenshot.png -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/describing_ui/images/component_owned_props_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.3/pt-br/describing_ui/images/component_owned_props_screenshot.png -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/describing_ui/images/screenshot_about_component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.3/pt-br/describing_ui/images/screenshot_about_component.png -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/images/compiletimecorrect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.3/pt-br/images/compiletimecorrect.png -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/images/component_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.3/pt-br/images/component_tree.png -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/images/diffing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.3/pt-br/images/diffing.png -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/images/dioxuslogo_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.3/pt-br/images/dioxuslogo_full.png -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/images/oldnew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.3/pt-br/images/oldnew.png -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/images/publish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.3/pt-br/images/publish.png -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/interactivity/images/counter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.3/pt-br/interactivity/images/counter.png -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/interactivity/images/counter_two_state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.3/pt-br/interactivity/images/counter_two_state.png -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/interactivity/images/meme_editor_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.3/pt-br/interactivity/images/meme_editor_screenshot.png -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/interactivity/index.md: -------------------------------------------------------------------------------- 1 | # Interatividade 2 | 3 | Até agora, aprendemos como descrever a estrutura e as propriedades de nossas interfaces de usuário. No entanto, a maioria das interfaces precisa ser interativa para ser útil. Neste capítulo, descrevemos como fazer um aplicativo Dioxus que responde ao usuário. 4 | -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/interactivity/roteador.md: -------------------------------------------------------------------------------- 1 | # Roteamento 2 | -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/lib.rs: -------------------------------------------------------------------------------- 1 | // empty (we only need this crate for the examples) 2 | -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/publishing/index.md: -------------------------------------------------------------------------------- 1 | # Publicando 2 | -------------------------------------------------------------------------------- /docs-src/0.3/pt-br/publishing/web.md: -------------------------------------------------------------------------------- 1 | ## Publicando com o Github Pages 2 | 3 | Para construir nosso aplicativo e publicá-lo no Github: 4 | 5 | - Verifique se o GitHub Pages está configurado para seu repositório 6 | - Crie seu aplicativo com `trunk build --release` (inclua `--public-url ` para atualizar os prefixos de ativos se estiver usando um site de projeto) 7 | - Mova seu HTML/CSS/JS/Wasm gerado de `dist` para a pasta configurada para Github Pages 8 | - Adicione e confirme com `git` 9 | - `git push` para o GitHub 10 | -------------------------------------------------------------------------------- /docs-src/0.4/en/CLI/index.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | The ✨**Dioxus CLI**✨ is a tool to get Dioxus projects off the ground. 4 | 5 | There's no documentation for commands here, but you can see all commands using `dx --help` once you've installed the CLI! Furthermore, you can run `dx --help` to get help with a specific command. 6 | 7 | ## Features 8 | 9 | * Build and pack a Dioxus project. 10 | * Format `rsx` code. 11 | * Hot Reload for `web` platform. 12 | * Create a Dioxus project from a template repository. 13 | * And more! 14 | -------------------------------------------------------------------------------- /docs-src/0.4/en/CLI/plugin/interface/command.md: -------------------------------------------------------------------------------- 1 | # Command Functions 2 | 3 | You can use command functions to execute code and scripts. 4 | 5 | Type definition: 6 | ``` 7 | Stdio: "Inherit" | "Piped" | "Null" 8 | ``` 9 | 10 | ### exec 11 | 12 | You can use this function to run some commands on the current system. 13 | 14 | ```lua 15 | local cmd = plugin.command 16 | 17 | manager.test = function () 18 | cmd.exec({"git", "clone", "https://github.com/DioxusLabs/cli-plugin-library"}) 19 | end 20 | ``` 21 | > Warning: This function doesn't catch exceptions. -------------------------------------------------------------------------------- /docs-src/0.4/en/CLI/plugin/interface/dirs.md: -------------------------------------------------------------------------------- 1 | # Dirs Functions 2 | 3 | Dirs functions are for getting various directory paths. Not to be confused with `plugin.path`. 4 | 5 | ### plugin_dir 6 | 7 | Get the plugin's root directory path. 8 | 9 | ```lua 10 | local path = plugin.dirs.plugin_dir() 11 | -- example: ~/Development/DioxusCli/plugin/test-plugin/ 12 | ``` 13 | 14 | ### bin_dir 15 | 16 | Get the plugin's binary directory path. Put binary files like `tailwind-cli` or `sass-cli` in this directory. 17 | 18 | ```lua 19 | local path = plugin.dirs.bin_dir() 20 | -- example: ~/Development/DioxusCli/plugin/test-plugin/bin/ 21 | ``` 22 | 23 | ### temp_dir 24 | 25 | Get the plugin's temporary directory path. Put any temporary files here. 26 | 27 | ```lua 28 | local path = plugin.dirs.bin_dir() 29 | -- example: ~/Development/DioxusCli/plugin/test-plugin/temp/ 30 | ``` -------------------------------------------------------------------------------- /docs-src/0.4/en/CLI/plugin/interface/log.md: -------------------------------------------------------------------------------- 1 | # Log Functions 2 | 3 | You can use log functions to print various logging information. 4 | 5 | ### trace 6 | 7 | Print trace log info. 8 | 9 | ```lua 10 | local log = plugin.log 11 | log.trace("trace information") 12 | ``` 13 | 14 | ### debug 15 | 16 | Print debug log info. 17 | 18 | ```lua 19 | local log = plugin.log 20 | log.debug("debug information") 21 | ``` 22 | 23 | ### info 24 | 25 | Print info log info. 26 | 27 | ```lua 28 | local log = plugin.log 29 | log.info("info information") 30 | ``` 31 | 32 | ### warn 33 | 34 | Print warning log info. 35 | 36 | ```lua 37 | local log = plugin.log 38 | log.warn("warn information") 39 | ``` 40 | 41 | ### error 42 | 43 | Print error log info. 44 | 45 | ```lua 46 | local log = plugin.log 47 | log.error("error information") 48 | ``` -------------------------------------------------------------------------------- /docs-src/0.4/en/CLI/plugin/interface/os.md: -------------------------------------------------------------------------------- 1 | # OS Functions 2 | 3 | OS functions are for getting system information. 4 | 5 | ### current_platform 6 | 7 | Get the current OS platform. 8 | 9 | ```lua 10 | local platform = plugin.os.current_platform() 11 | ``` -------------------------------------------------------------------------------- /docs-src/0.4/en/contributing/governance.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.4/en/contributing/governance.md -------------------------------------------------------------------------------- /docs-src/0.4/en/cookbook/integrations/auth.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.4/en/cookbook/integrations/auth.md -------------------------------------------------------------------------------- /docs-src/0.4/en/cookbook/integrations/database.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.4/en/cookbook/integrations/database.md -------------------------------------------------------------------------------- /docs-src/0.4/en/cookbook/integrations/index.md: -------------------------------------------------------------------------------- 1 | This section of the guide provides getting started guides for common tools used with Dioxus. 2 | 3 | - [Logging](./logging.md) 4 | - [Internationalization](./internationalization.md) -------------------------------------------------------------------------------- /docs-src/0.4/en/cookbook/integrations/internationalization.md: -------------------------------------------------------------------------------- 1 | # Internationalization 2 | 3 | If your application supports multiple languages, the [Dioxus SDK](https://github.com/DioxusLabs/sdk) crate contains helpers to make working with translations in your application easier. 4 | 5 | ## The full code for internationalization 6 | 7 | ```rust 8 | {{#include src/doc_examples/untested_04/i18n.rs}} 9 | ``` 10 | -------------------------------------------------------------------------------- /docs-src/0.4/en/cookbook/state/index.md: -------------------------------------------------------------------------------- 1 | # State Cookbook 2 | 3 | - [External State](external/index.md) 4 | - [Custom Hook](custom_hooks/index.md) -------------------------------------------------------------------------------- /docs-src/0.4/en/guide/full_code.md: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | Well done! You've completed the Dioxus guide and built a hackernews application in Dioxus. 4 | 5 | To continue your journey, you can attempt a challenge listed below, or look at the [Dioxus reference](../reference/index.md). 6 | 7 | ## Challenges 8 | 9 | - Organize your components into separate files for better maintainability. 10 | - Give your app some style if you haven't already. 11 | - Integrate your application with the [Dioxus router](../router/index.md). 12 | 13 | 14 | ## The full code for the hacker news project 15 | 16 | ```rust 17 | {{#include src/doc_examples/untested_04/hackernews_complete.rs}} 18 | ``` 19 | -------------------------------------------------------------------------------- /docs-src/0.4/en/guide/index.md: -------------------------------------------------------------------------------- 1 | In this guide, you'll learn to use Dioxus to build user interfaces that run anywhere. We will recreate the hackernews homepage in Dioxus: 2 | 3 | ```inject-dioxus 4 | DemoFrame { 5 | hackernews_complete::App {} 6 | } 7 | ``` 8 | 9 | This guide serves a very brief overview of Dioxus. Throughout the guide, there will be links to the [reference](../reference/index.md) with more details about specific concepts. 10 | 11 | 12 | First, lets setup our dependencies. In addition to the dependencies you added in the [getting started](../getting_started/index.md) guide for your platform, we need to set up a few more dependencies to work with the hacker news API: 13 | 14 | ```sh 15 | cargo add chrono --features serde 16 | cargo add futures 17 | cargo add reqwest --features json 18 | cargo add serde --features derive 19 | cargo add serde_json 20 | cargo add async_recursion 21 | ``` 22 | -------------------------------------------------------------------------------- /docs-src/0.4/en/migration/hot_reload.md: -------------------------------------------------------------------------------- 1 | # Hot reloading 2 | 3 | Desktop hot reloading has changed in the `0.4` release to use the [Dioxus CLI](../CLI/index.md) for all platforms. 4 | 5 | Previously, you may have included the `hot_reload_init!` macro in your main function. This is no longer needed. 6 | 7 | old: 8 | ```rust 9 | fn main() { 10 | hot_reload_init!(); 11 | // ... 12 | } 13 | ``` 14 | 15 | new: 16 | ```rust 17 | fn main() { 18 | // ... 19 | } 20 | ``` 21 | 22 | Now you can run your project with the dioxus CLI by passing the `--platform` flag: 23 | 24 | ```sh 25 | dx serve --platform desktop --hot-reload 26 | ``` 27 | -------------------------------------------------------------------------------- /docs-src/0.4/en/migration/index.md: -------------------------------------------------------------------------------- 1 | # 0.3 Migration Guide 2 | 3 | This guide will outline the API changes between the `0.3` and `0.4` releases. The two major breaking changes in this release are how hot reloading works on desktop platforms and how the router works: 4 | 5 | - [Hot reload](hot_reload.md) 6 | - [Router](router.md) 7 | -------------------------------------------------------------------------------- /docs-src/0.4/en/reference/fullstack/authentication.md: -------------------------------------------------------------------------------- 1 | # Authentication 2 | 3 | You can use [extractors](./extractors.md) to integrate auth with your Fullstack application. 4 | 5 | You can create a custom extractors that extracts the auth session from the request. From that auth session, you can check if the user has the required privileges before returning the private data. 6 | 7 | A [full auth example](https://github.com/dioxuslabs/dioxus/blob/master/packages/fullstack/examples/axum-auth/src/main.rs) with the complete implementation is available in the fullstack examples. 8 | -------------------------------------------------------------------------------- /docs-src/0.4/en/reference/fullstack/index.md: -------------------------------------------------------------------------------- 1 | # Fullstack development 2 | 3 | Dioxus Fullstack contains helpers for: 4 | - Incremental, static, and server side rendering 5 | - Hydrating your application on the Client 6 | - Communicating between a server and a client 7 | 8 | This guide will teach you everything you need to know about how to use the utilities in Dioxus fullstack to create amazing fullstack applications. 9 | 10 | 11 | > In addition to this guide, you can find more examples of full-stack apps and information about how to integrate with other frameworks and desktop renderers in the [dioxus-fullstack examples directory](https://github.com/DioxusLabs/dioxus/tree/master/packages/fullstack/examples). 12 | -------------------------------------------------------------------------------- /docs-src/0.4/en/reference/fullstack/middleware.md: -------------------------------------------------------------------------------- 1 | # Middleware 2 | 3 | Extractors allow you to wrap your server function in some code that changes either the request or the response. Dioxus fullstack integrates with [Tower](https://docs.rs/tower/latest/tower/index.html) to allow you to wrap your server functions in middleware. 4 | 5 | You can use the `#[middleware]` attribute to add a layer of middleware to your server function. Let's add a timeout middleware to a server function. This middleware will stop running the server function if it reaches a certain timeout: 6 | 7 | ```rust 8 | {{#include src/doc_examples/untested_04/server_function_middleware.rs:server_function_middleware}} 9 | ``` 10 | -------------------------------------------------------------------------------- /docs-src/0.4/en/reference/fullstack/routing.md: -------------------------------------------------------------------------------- 1 | # Routing 2 | 3 | You can easily integrate your fullstack application with a client side router using the `launch_router` macro. The `launch_router` macro works the same as the `launch` macro except it accepts a Router instead of a Component: 4 | 5 | ```rust 6 | {{#include src/doc_examples/untested_04/server_router.rs}} 7 | ``` 8 | 9 | ```inject-dioxus 10 | SandBoxFrame { 11 | url: "https://codesandbox.io/p/sandbox/dioxus-fullstack-router-s75v5q?file=%2Fsrc%2Fmain.rs%3A7%2C1" 12 | } 13 | ``` 14 | -------------------------------------------------------------------------------- /docs-src/0.4/en/reference/images/meme_editor_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/docs-src/0.4/en/reference/images/meme_editor_screenshot.png -------------------------------------------------------------------------------- /docs-src/0.4/en/reference/memoization.md: -------------------------------------------------------------------------------- 1 | # Memoization 2 | 3 | [`use_memo`](https://docs.rs/dioxus-hooks/latest/dioxus_hooks/fn.use_memo.html) let's you memorize values and thus save computation time. This is useful for expensive calculations. 4 | 5 | ```rust, no_run 6 | #[component] 7 | fn Calculator(cx: Scope, number: usize) -> Element { 8 | let bigger_number = use_memo(cx, (number,), |(number,)| { 9 | // This will only be calculated when `number` has changed. 10 | number * 100 11 | }); 12 | render!( 13 | p { "{bigger_number}" } 14 | ) 15 | } 16 | fn app(cx: Scope) -> Element { 17 | render!(Calculator { number: 0 }) 18 | } 19 | ``` 20 | -------------------------------------------------------------------------------- /docs-src/0.4/en/router/example/full-code.md: -------------------------------------------------------------------------------- 1 | # Full Code 2 | 3 | ```rust 4 | {{#include src/doc_examples/untested_04/full_example.rs}} 5 | ``` 6 | -------------------------------------------------------------------------------- /docs-src/0.4/en/router/lib.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs-src/0.4/en/router/reference/history-providers.md: -------------------------------------------------------------------------------- 1 | # History Providers 2 | 3 | [`HistoryProvider`]s are used by the router to keep track of the navigation history 4 | and update any external state (e.g. the browser's URL). 5 | 6 | The router provides two [`HistoryProvider`]s, but you can also create your own. 7 | The two default implementations are: 8 | 9 | - The [`MemoryHistory`] is a custom implementation that works in memory. 10 | - The [`WebHistory`] integrates with the browser's URL. 11 | 12 | By default, the router uses the [`MemoryHistory`]. It might be changed to use 13 | [`WebHistory`] when the `web` feature is active, but that is not guaranteed. 14 | 15 | You can override the default history: 16 | 17 | ```rust 18 | {{#include src/doc_examples/untested_04/history_provider.rs:app}} 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs-src/0.4/en/router/reference/index.md: -------------------------------------------------------------------------------- 1 | # Adding the router to your application 2 | 3 | In this chapter, we will learn how to add the router to our app. By itself, this 4 | is not very useful. However, it is a prerequisite for all the functionality 5 | described in the other chapters. 6 | 7 | > Make sure you added the `dioxus-router` dependency as explained in the 8 | > [introduction](../index.md). 9 | 10 | In most cases, we want to add the router to the root component of our app. This 11 | way, we can ensure that we have access to all its functionality everywhere. 12 | 13 | First, we define the router with the router macro: 14 | 15 | ```rust 16 | {{#include src/doc_examples/untested_04/first_route.rs:router}} 17 | ``` 18 | 19 | Then we render the router with the [`Router`] component. 20 | 21 | ```rust 22 | {{#include src/doc_examples/untested_04/first_route.rs:app}} 23 | ``` 24 | -------------------------------------------------------------------------------- /docs-src/0.4/en/router/reference/redirects.md: -------------------------------------------------------------------------------- 1 | # Redirects 2 | 3 | In some cases, we may want to redirect our users to another page whenever they 4 | open a specific path. We can tell the router to do this with the `#[redirect]` 5 | attribute. 6 | 7 | The `#[redirect]` attribute accepts a route and a closure with all of the parameters defined in the route. The closure must return a [`NavigationTarget`]. 8 | 9 | In the following example, we will redirect everybody from `/myblog` and `/myblog/:id` to `/blog` and `/blog/:id` respectively 10 | 11 | ```rust 12 | {{#include src/doc_examples/untested_04/full_example.rs:router}} 13 | ``` 14 | -------------------------------------------------------------------------------- /docs-src/0.4/en/router/reference/static-generation.md: -------------------------------------------------------------------------------- 1 | # Static Generation 2 | 3 | ## Getting the Sitemap 4 | 5 | The [`Routable`] trait includes an associated [`SITE_MAP`] constant that contains the map of all of the routes in the enum. 6 | 7 | By default, the sitemap is a tree of (static or dynamic) RouteTypes, but it can be flattened into a list of individual routes with the `.flatten()` method. 8 | 9 | ## Generating a Sitemap 10 | 11 | To statically render pages, we need to flatten the route tree and generate a file for each route that contains only static segments: 12 | 13 | ```rust 14 | {{#include src/doc_examples/untested_04/static_generation.rs}} 15 | ``` 16 | 17 | ## Example 18 | 19 | - [examples/static-hydrated](https://github.com/DioxusLabs/dioxus/tree/master/packages%2Ffullstack%2Fexamples%2Fstatic-hydrated) 20 | -------------------------------------------------------------------------------- /docs-src/0.5/src/CLI/index.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | The ✨**Dioxus CLI**✨ is a tool to get Dioxus projects off the ground. 4 | 5 | There's no documentation for commands here, but you can see all commands using `dx --help` once you've installed the CLI! Furthermore, you can run `dx --help` to get help with a specific command. 6 | 7 | ## Features 8 | 9 | * Build and pack a Dioxus project. 10 | * Format `rsx` code. 11 | * Hot Reload. 12 | * Create a Dioxus project from a template repository. 13 | * And more! 14 | -------------------------------------------------------------------------------- /docs-src/0.5/src/contributing/governance.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs-src/0.5/src/cookbook/integrations/auth.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs-src/0.5/src/cookbook/integrations/database.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs-src/0.5/src/cookbook/integrations/index.md: -------------------------------------------------------------------------------- 1 | This section of the guide provides getting started guides for common tools used with Dioxus. 2 | 3 | - [Logging](./logging.md) 4 | - [Internationalization](./internationalization.md) -------------------------------------------------------------------------------- /docs-src/0.5/src/cookbook/integrations/internationalization.md: -------------------------------------------------------------------------------- 1 | # Internationalization 2 | 3 | If your application supports multiple languages, the [Dioxus SDK](https://github.com/DioxusLabs/sdk) crate contains helpers to make working with translations in your application easier. 4 | 5 | ## The full code for internationalization 6 | 7 | ```rust 8 | {{#include src/doc_examples/untested_05/i18n.rs}} 9 | ``` -------------------------------------------------------------------------------- /docs-src/0.5/src/cookbook/state/index.md: -------------------------------------------------------------------------------- 1 | # State Cookbook 2 | 3 | - [External State](external/index.md) 4 | - [Custom Hook](custom_hooks/index.md) -------------------------------------------------------------------------------- /docs-src/0.5/src/guide/full_code.md: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | Well done! You've completed the Dioxus guide and built a hackernews application in Dioxus. 4 | 5 | To continue your journey, you can attempt a challenge listed below, or look at the [Dioxus reference](../reference/index.md). 6 | 7 | ## Challenges 8 | 9 | - Organize your components into separate files for better maintainability. 10 | - Give your app some style if you haven't already. 11 | - Integrate your application with the [Dioxus router](../router/index.md). 12 | 13 | 14 | ## The full code for the hacker news project 15 | 16 | ```rust 17 | {{#include src/doc_examples/hackernews_complete.rs}} 18 | ``` 19 | -------------------------------------------------------------------------------- /docs-src/0.5/src/guide/index.md: -------------------------------------------------------------------------------- 1 | # Dioxus Guide 2 | 3 | ## Introduction 4 | 5 | In this guide, you'll learn to use Dioxus to build user interfaces that run anywhere. We will recreate the hackernews homepage in Dioxus: 6 | 7 | ```inject-dioxus 8 | DemoFrame { 9 | hackernews_complete::App {} 10 | } 11 | ``` 12 | 13 | This guide serves a very brief overview of Dioxus. Throughout the guide, there will be links to the [reference](../reference/index.md) with more details about specific concepts. 14 | -------------------------------------------------------------------------------- /docs-src/0.5/src/reference/fullstack/authentication.md: -------------------------------------------------------------------------------- 1 | # Authentication 2 | 3 | You can use [extractors](./extractors) to integrate auth with your Fullstack application. 4 | 5 | You can create a custom extractors that extracts the auth session from the request. From that auth session, you can check if the user has the required privileges before returning the private data. 6 | 7 | A [full auth example](https://github.com/DioxusLabs/dioxus/blob/v0.5/packages/fullstack/examples/axum-auth/src/main.rs) with the complete implementation is available in the fullstack examples. 8 | -------------------------------------------------------------------------------- /docs-src/0.5/src/reference/fullstack/index.md: -------------------------------------------------------------------------------- 1 | # Fullstack development 2 | 3 | Dioxus Fullstack contains helpers for: 4 | - Incremental, static, and server side rendering 5 | - Hydrating your application on the Client 6 | - Communicating between a server and a client 7 | 8 | This guide will teach you everything you need to know about how to use the utilities in Dioxus fullstack to create amazing fullstack applications. 9 | 10 | 11 | > In addition to this guide, you can find more examples of full-stack apps and information about how to integrate with other frameworks and desktop renderers in the [dioxus-fullstack examples directory](https://github.com/DioxusLabs/dioxus/tree/v0.5/packages/fullstack/examples). 12 | -------------------------------------------------------------------------------- /docs-src/0.5/src/reference/fullstack/middleware.md: -------------------------------------------------------------------------------- 1 | # Middleware 2 | 3 | Extractors allow you to wrap your server function in some code that changes either the request or the response. Dioxus fullstack integrates with [Tower](https://docs.rs/tower/latest/tower/index.html) to allow you to wrap your server functions in middleware. 4 | 5 | You can use the `#[middleware]` attribute to add a layer of middleware to your server function. Let's add a timeout middleware to a server function. This middleware will stop running the server function if it reaches a certain timeout: 6 | 7 | ```rust 8 | {{#include src/doc_examples/untested_05/server_function_middleware.rs:server_function_middleware}} 9 | ``` 10 | -------------------------------------------------------------------------------- /docs-src/0.5/src/reference/fullstack/routing.md: -------------------------------------------------------------------------------- 1 | # Routing 2 | 3 | You can easily integrate your fullstack application with a client side router using Dioxus Router. This allows you to create different scenes in your app and navigate between them. You can read more about the router in the [router reference](../router.md) 4 | 5 | ```rust 6 | {{#include src/doc_examples/server_router.rs}} 7 | ``` 8 | 9 | ```inject-dioxus 10 | SandBoxFrame { 11 | url: "https://codesandbox.io/p/sandbox/dioxus-fullstack-router-s75v5q?file=%2Fsrc%2Fmain.rs%3A7%2C1" 12 | } 13 | ``` 14 | -------------------------------------------------------------------------------- /docs-src/0.5/src/router/example/full-code.md: -------------------------------------------------------------------------------- 1 | # Full Code 2 | 3 | ```rust 4 | {{#include src/doc_examples/full_example.rs}} 5 | ``` 6 | -------------------------------------------------------------------------------- /docs-src/0.5/src/router/reference/history-providers.md: -------------------------------------------------------------------------------- 1 | # History Providers 2 | 3 | [`HistoryProvider`]s are used by the router to keep track of the navigation history 4 | and update any external state (e.g. the browser's URL). 5 | 6 | The router provides two [`HistoryProvider`]s, but you can also create your own. 7 | The two default implementations are: 8 | 9 | - The [`MemoryHistory`] is a custom implementation that works in memory. 10 | - The [`LiveviewHistory`] is a custom implementation that works with the liveview renderer. 11 | - The [`WebHistory`] integrates with the browser's URL. 12 | 13 | By default, the router uses the [`MemoryHistory`]. It might be changed to use 14 | [`WebHistory`] when the `web` feature is active, but that is not guaranteed. 15 | 16 | You can override the default history: 17 | 18 | ```rust 19 | {{#include src/doc_examples/untested_05/history_provider.rs:app}} 20 | ``` 21 | 22 | -------------------------------------------------------------------------------- /docs-src/0.5/src/router/reference/index.md: -------------------------------------------------------------------------------- 1 | # Adding the router to your application 2 | 3 | In this chapter, we will learn how to add the router to our app. By itself, this 4 | is not very useful. However, it is a prerequisite for all the functionality 5 | described in the other chapters. 6 | 7 | > Make sure you added the `dioxus-router` dependency as explained in the 8 | > [introduction](../index.md). 9 | 10 | In most cases, we want to add the router to the root component of our app. This 11 | way, we can ensure that we have access to all its functionality everywhere. 12 | 13 | First, we define the router with the router macro: 14 | 15 | ```rust 16 | {{#include src/doc_examples/first_route.rs:router}} 17 | ``` 18 | 19 | Then we render the router with the [`Router`] component. 20 | 21 | ```rust 22 | {{#include src/doc_examples/first_route.rs:app}} 23 | ``` 24 | -------------------------------------------------------------------------------- /docs-src/0.5/src/router/reference/redirects.md: -------------------------------------------------------------------------------- 1 | # Redirects 2 | 3 | In some cases, we may want to redirect our users to another page whenever they 4 | open a specific path. We can tell the router to do this with the `#[redirect]` 5 | attribute. 6 | 7 | The `#[redirect]` attribute accepts a route and a closure with all of the parameters defined in the route. The closure must return a [`NavigationTarget`]. 8 | 9 | In the following example, we will redirect everybody from `/myblog` and `/myblog/:id` to `/blog` and `/blog/:id` respectively 10 | 11 | ```rust 12 | {{#include src/doc_examples/full_example.rs:router}} 13 | ``` 14 | 15 | [`NavigationTarget`]: https://docs.rs/dioxus-router/latest/dioxus_router/navigation/enum.NavigationTarget.html -------------------------------------------------------------------------------- /docs-src/0.5/src/router/reference/static-generation.md: -------------------------------------------------------------------------------- 1 | # Static Generation 2 | 3 | ## Getting the Sitemap 4 | 5 | The [`Routable`] trait includes an associated [`SITE_MAP`] constant that contains the map of all of the routes in the enum. 6 | 7 | By default, the sitemap is a tree of (static or dynamic) RouteTypes, but it can be flattened into a list of individual routes with the `.flatten()` method. 8 | 9 | ## Generating a Sitemap 10 | 11 | To statically render pages, we need to flatten the route tree and generate a file for each route that contains only static segments: 12 | 13 | ```rust 14 | {{#include src/doc_examples/untested_05/static_generation.rs}} 15 | ``` 16 | 17 | ## Example 18 | 19 | - [examples/static-hydrated](https://github.com/DioxusLabs/dioxus/tree/v0.5/packages/fullstack/examples/static-hydrated) 20 | 21 | [`Routable`]: https://docs.rs/dioxus-router/latest/dioxus_router/components/fn.Routable.html 22 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/CLI/creating.md: -------------------------------------------------------------------------------- 1 | # 创建项目 2 | 3 | 安装了 Dioxus CLI 之后,你可以使用它来创建自己的项目! 4 | 5 | ## 初始化项目 6 | 7 | 首先,运行 `dx new` 命令来创建一个新项目。 8 | 9 | > 它会克隆这个 [模板](https://github.com/DioxusLabs/dioxus-template),该模板用于创建 dioxus 应用程序。 10 | > 11 | > 你可以通过传递 `template` 参数从不同的模板创建项目: 12 | > ``` 13 | > dx new --template gh:dioxuslabs/dioxus-template 14 | > ``` 15 | 16 | 接下来,使用 `cd project-name` 导航到你的新项目中,或者直接在 IDE 中打开它。 17 | 18 | > 在运行项目之前,请确保已安装 WASM 目标。 19 | > 你可以使用 rustup 安装 rust 的 WASM 目标: 20 | > ``` 21 | > rustup target add wasm32-unknown-unknown 22 | > ``` 23 | 24 | 最后,使用 `dx serve` 来服务你的项目!CLI 将告诉你它正在哪个地址上提供服务,以及其他信息,如代码警告。 -------------------------------------------------------------------------------- /docs-src/0.5/zh/CLI/index.md: -------------------------------------------------------------------------------- 1 | # 介绍 2 | 3 | ✨ **Dioxus CLI** ✨ 是一个帮助你快速启动 Dioxus 项目的工具。 4 | 5 | 这里没有命令的文档,但是一旦你安装了 CLI,你可以使用 `dx --help` 查看所有命令!此外,你可以运行 `dx --help` 来获取特定命令的帮助。 6 | 7 | ## 特性 8 | 9 | * 构建和打包 Dioxus 项目。 10 | * 格式化 `rsx` 代码。 11 | * 热加载。 12 | * 从模板仓库创建一个 Dioxus 项目。 13 | * 等等! 14 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/contributing/governance.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/cookbook/integrations/auth.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/cookbook/integrations/database.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/cookbook/integrations/index.md: -------------------------------------------------------------------------------- 1 | This section of the guide provides getting started guides for common tools used with Dioxus. 2 | 3 | - [Logging](./logging.md) 4 | - [Internationalization](./internationalization.md) -------------------------------------------------------------------------------- /docs-src/0.5/zh/cookbook/integrations/internationalization.md: -------------------------------------------------------------------------------- 1 | # Internationalization 2 | 3 | If you application supports multiple languages, the [Dioxus SDK](https://github.com/DioxusLabs/sdk) crate contains helpers to make working with translations in your application easier. 4 | 5 | ## The full code for internationalization 6 | 7 | \```rust 8 | {{#include src/doc_examples/i18n.rs}} 9 | \``` -------------------------------------------------------------------------------- /docs-src/0.5/zh/cookbook/state/index.md: -------------------------------------------------------------------------------- 1 | # State Cookbook 2 | 3 | - [External State](external/index.md.md) 4 | - [Custom Hook](custom_hooks/index.md) -------------------------------------------------------------------------------- /docs-src/0.5/zh/guide/full_code.md: -------------------------------------------------------------------------------- 1 | # Conclusion 2 | 3 | Well done! You've completed the Dioxus guide and built a hackernews application in Dioxus. 4 | 5 | To continue your journey, you can attempt a challenge listed below, or look at the [Dioxus reference](../reference/index.md). 6 | 7 | ## Challenges 8 | 9 | - Organize your components into separate files for better maintainability. 10 | - Give your app some style if you haven't already. 11 | - Integrate your application with the [Dioxus router](../router/index.md). 12 | 13 | 14 | ## The full code for the hacker news project 15 | 16 | \```rust 17 | {{#include src/doc_examples/hackernews_complete.rs}} 18 | \``` 19 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/reference/fullstack/authentication.md: -------------------------------------------------------------------------------- 1 | # Authentication 2 | 3 | You can use [extractors](./extractors) to integrate auth with your Fullstack application. 4 | 5 | You can create a custom extractors that extracts the auth session from the request. From that auth session, you can check if the user has the required privileges before returning the private data. 6 | 7 | A [full auth example](https://github.com/dioxuslabs/dioxus/blob/main/packages/fullstack/examples/axum-auth/src/main.rs) with the complete implementation is available in the fullstack examples. 8 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/reference/fullstack/index.md: -------------------------------------------------------------------------------- 1 | # Fullstack development 2 | 3 | Dioxus Fullstack contains helpers for: 4 | - Incremental, static, and server side rendering 5 | - Hydrating your application on the Client 6 | - Communicating between a server and a client 7 | 8 | This guide will teach you everything you need to know about how to use the utilities in Dioxus fullstack to create amazing fullstack applications. 9 | 10 | 11 | > In addition to this guide, you can find more examples of full-stack apps and information about how to integrate with other frameworks and desktop renderers in the [dioxus-fullstack examples directory](https://github.com/DioxusLabs/dioxus/tree/main/packages/fullstack/examples). 12 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/reference/fullstack/middleware.md: -------------------------------------------------------------------------------- 1 | # Middleware 2 | 3 | Extractors allow you to wrap your server function in some code that changes either the request or the response. Dioxus fullstack integrates with [Tower](https://docs.rs/tower/latest/tower/index.html) to allow you to wrap your server functions in middleware. 4 | 5 | You can use the `#[middleware]` attribute to add a layer of middleware to your server function. Let's add a timeout middleware to a server function. This middleware will stop running the server function if it reaches a certain timeout: 6 | 7 | \```rust 8 | {{#include src/doc_examples/server_function_middleware.rs:server_function_middleware}} 9 | \``` 10 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/reference/fullstack/routing.md: -------------------------------------------------------------------------------- 1 | # Routing 2 | 3 | You can easily integrate your fullstack application with a client side router using Dioxus Router. This allows you to create different scenes in your app and navigate between them. You can read more about the router in the [router reference](../router.md) 4 | 5 | \```rust 6 | {{#include src/doc_examples/server_router.rs}} 7 | \``` 8 | 9 | \```inject-dioxus 10 | SandBoxFrame { 11 | url: "https://codesandbox.io/p/sandbox/dioxus-fullstack-router-s75v5q?file=%2Fsrc%2Fmain.rs%3A7%2C1" 12 | } 13 | \``` 14 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/router/example/full-code.md: -------------------------------------------------------------------------------- 1 | # Full Code 2 | 3 | \```rust 4 | {{#include src/doc_examples/full_example.rs}} 5 | \``` 6 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/router/lib.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/router/reference/history-providers.md: -------------------------------------------------------------------------------- 1 | # History Providers 2 | 3 | [`HistoryProvider`]s are used by the router to keep track of the navigation history 4 | and update any external state (e.g. the browser's URL). 5 | 6 | The router provides two [`HistoryProvider`]s, but you can also create your own. 7 | The two default implementations are: 8 | 9 | - The [`MemoryHistory`] is a custom implementation that works in memory. 10 | - The [`LiveviewHistory`] is a custom implementation that works with the liveview renderer. 11 | - The [`WebHistory`] integrates with the browser's URL. 12 | 13 | By default, the router uses the [`MemoryHistory`]. It might be changed to use 14 | [`WebHistory`] when the `web` feature is active, but that is not guaranteed. 15 | 16 | You can override the default history: 17 | 18 | \```rust 19 | {{#include src/doc_examples/history_provider.rs:app}} 20 | \``` 21 | 22 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/router/reference/index.md: -------------------------------------------------------------------------------- 1 | # Adding the router to your application 2 | 3 | In this chapter, we will learn how to add the router to our app. By itself, this 4 | is not very useful. However, it is a prerequisite for all the functionality 5 | described in the other chapters. 6 | 7 | > Make sure you added the `dioxus-router` dependency as explained in the 8 | > [introduction](../index.md). 9 | 10 | In most cases, we want to add the router to the root component of our app. This 11 | way, we can ensure that we have access to all its functionality everywhere. 12 | 13 | First, we define the router with the router macro: 14 | 15 | \```rust 16 | {{#include src/doc_examples/first_route.rs:router}} 17 | \``` 18 | 19 | Then we render the router with the [`Router`] component. 20 | 21 | \```rust 22 | {{#include src/doc_examples/first_route.rs:app}} 23 | \``` 24 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/router/reference/redirects.md: -------------------------------------------------------------------------------- 1 | # Redirects 2 | 3 | In some cases, we may want to redirect our users to another page whenever they 4 | open a specific path. We can tell the router to do this with the `#[redirect]` 5 | attribute. 6 | 7 | The `#[redirect]` attribute accepts a route and a closure with all of the parameters defined in the route. The closure must return a [`NavigationTarget`]. 8 | 9 | In the following example, we will redirect everybody from `/myblog` and `/myblog/:id` to `/blog` and `/blog/:id` respectively 10 | 11 | \```rust 12 | {{#include src/doc_examples/full_example.rs:router}} 13 | \``` 14 | -------------------------------------------------------------------------------- /docs-src/0.5/zh/router/reference/static-generation.md: -------------------------------------------------------------------------------- 1 | # Static Generation 2 | 3 | ## Getting the Sitemap 4 | 5 | The [`Routable`] trait includes an associated [`SITE_MAP`] constant that contains the map of all of the routes in the enum. 6 | 7 | By default, the sitemap is a tree of (static or dynamic) RouteTypes, but it can be flattened into a list of individual routes with the `.flatten()` method. 8 | 9 | ## Generating a Sitemap 10 | 11 | To statically render pages, we need to flatten the route tree and generate a file for each route that contains only static segments: 12 | 13 | \```rust 14 | {{#include src/doc_examples/static_generation.rs}} 15 | \``` 16 | 17 | ## Example 18 | 19 | - [examples/static-hydrated](https://github.com/DioxusLabs/dioxus/tree/main/packages%2Ffullstack%2Fexamples%2Fstatic-hydrated) 20 | -------------------------------------------------------------------------------- /docs-src/0.6/src/CLI/index.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | The ✨**Dioxus CLI**✨ is a tool to get Dioxus projects off the ground. 4 | 5 | There's no documentation for commands here, but you can see all commands using `dx --help` once you've installed the CLI! Furthermore, you can run `dx --help` to get help with a specific command. 6 | 7 | ## Features 8 | 9 | * Build and pack a Dioxus project. 10 | * Format `rsx` code. 11 | * Hot Reload. 12 | * Create a Dioxus project from a template repository. 13 | * And more! 14 | -------------------------------------------------------------------------------- /docs-src/0.6/src/contributing/governance.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs-src/0.6/src/cookbook/integrations/auth.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs-src/0.6/src/cookbook/integrations/database.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs-src/0.6/src/cookbook/integrations/index.md: -------------------------------------------------------------------------------- 1 | This section of the guide provides getting started guides for common tools used with Dioxus. 2 | 3 | - [Logging](./logging.md) 4 | - [Internationalization](./internationalization.md) -------------------------------------------------------------------------------- /docs-src/0.6/src/cookbook/integrations/internationalization.md: -------------------------------------------------------------------------------- 1 | # Internationalization 2 | 3 | If your application supports multiple languages, the [dioxus-i18n](https://github.com/dioxus-community/dioxus-i18n) crate contains helpers to make working with translations in your application easier. 4 | 5 | You can find an example [here](https://github.com/dioxus-community/dioxus-i18n/blob/main/examples/dioxus-desktop.rs). -------------------------------------------------------------------------------- /docs-src/0.6/src/cookbook/state/index.md: -------------------------------------------------------------------------------- 1 | # State Cookbook 2 | 3 | - [External State](external/index.md) 4 | - [Custom Hook](custom_hooks/index.md) -------------------------------------------------------------------------------- /docs-src/0.6/src/guides/fullstack/authentication.md: -------------------------------------------------------------------------------- 1 | # Authentication 2 | 3 | You can use [extractors](./extractors) to integrate auth with your Fullstack application. 4 | 5 | You can create a custom extractors that extracts the auth session from the request. From that auth session, you can check if the user has the required privileges before returning the private data. 6 | 7 | A [full auth example](https://github.com/DioxusLabs/dioxus/blob/v0.5/packages/fullstack/examples/axum-auth/src/main.rs) with the complete implementation is available in the fullstack examples. 8 | -------------------------------------------------------------------------------- /docs-src/0.6/src/guides/fullstack/index.md: -------------------------------------------------------------------------------- 1 | # Fullstack development 2 | 3 | Dioxus Fullstack contains helpers for: 4 | - Incremental, static, and server side rendering 5 | - Hydrating your application on the Client 6 | - Communicating between a server and a client 7 | 8 | This guide will teach you everything you need to know about how to use the utilities in Dioxus fullstack to create amazing fullstack applications. 9 | 10 | 11 | > In addition to this guide, you can find more examples of full-stack apps and information about how to integrate with other frameworks and desktop renderers in the [examples directory](https://github.com/DioxusLabs/dioxus/tree/main/examples). 12 | -------------------------------------------------------------------------------- /docs-src/0.6/src/guides/fullstack/middleware.md: -------------------------------------------------------------------------------- 1 | # Middleware 2 | 3 | Extractors allow you to wrap your server function in some code that changes either the request or the response. Dioxus fullstack integrates with [Tower](https://docs.rs/tower/latest/tower/index.html) to allow you to wrap your server functions in middleware. 4 | 5 | You can use the `#[middleware]` attribute to add a layer of middleware to your server function. Let's add a timeout middleware to a server function. This middleware will stop running the server function if it reaches a certain timeout: 6 | 7 | ```rust 8 | {{#include src/doc_examples/server_function_middleware.rs:server_function_middleware}} 9 | ``` 10 | -------------------------------------------------------------------------------- /docs-src/0.6/src/guides/fullstack/routing.md: -------------------------------------------------------------------------------- 1 | # Routing 2 | 3 | You can easily integrate your fullstack application with a client side router using Dioxus Router. This allows you to create different scenes in your app and navigate between them. You can read more about the router in the [router reference](../../router/index.md) 4 | 5 | ```rust 6 | {{#include src/doc_examples/server_router.rs}} 7 | ``` 8 | 9 | ```inject-dioxus 10 | SandBoxFrame { 11 | url: "https://codesandbox.io/p/sandbox/dioxus-fullstack-router-s75v5q?file=%2Fsrc%2Fmain.rs%3A7%2C1" 12 | } 13 | ``` 14 | -------------------------------------------------------------------------------- /docs-src/0.6/src/introduction/resources.md: -------------------------------------------------------------------------------- 1 | # Helpful resources 2 | -------------------------------------------------------------------------------- /docs-src/0.6/src/reference/index.md: -------------------------------------------------------------------------------- 1 | # Reference 2 | 3 | This portion of the Dioxus Docs contains specific details about features that provide more depth than what is necessary for most reading. 4 | 5 | - [RSX](./rsx.md) 6 | - [Components](./components.md) 7 | - [Props](./component_props.md) 8 | - [Event Handlers](./event_handlers.md) 9 | - [Hooks](./hooks.md) 10 | - [User Input](./user_input.md) 11 | - [Context](./context.md) 12 | - [Dynamic Rendering](./dynamic_rendering.md) 13 | - [Routing](./router.md) 14 | - [Resource](./use_resource.md) 15 | - [UseCoroutine](./use_coroutine.md) 16 | - [Spawn](./spawn.md) 17 | -------------------------------------------------------------------------------- /docs-src/0.6/src/router/example/full-code.md: -------------------------------------------------------------------------------- 1 | # Full Code 2 | 3 | ```rust 4 | {{#include src/doc_examples/full_example.rs}} 5 | ``` 6 | -------------------------------------------------------------------------------- /docs-src/0.6/src/router/lib.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs-src/0.6/src/router/reference/history-providers.md: -------------------------------------------------------------------------------- 1 | # History Providers 2 | 3 | [`HistoryProvider`]s are used by the router to keep track of the navigation history 4 | and update any external state (e.g. the browser's URL). 5 | 6 | The router provides two [`HistoryProvider`]s, but you can also create your own. 7 | The two default implementations are: 8 | 9 | - The [`MemoryHistory`] is a custom implementation that works in memory. 10 | - The [`LiveviewHistory`] is a custom implementation that works with the liveview renderer. 11 | - The [`WebHistory`] integrates with the browser's URL. 12 | 13 | By default, the router uses the [`MemoryHistory`]. It might be changed to use 14 | [`WebHistory`] when the `web` feature is active, but that is not guaranteed. 15 | 16 | You can override the default history: 17 | 18 | ```rust 19 | {{#include src/doc_examples/history_provider.rs:app}} 20 | ``` 21 | 22 | -------------------------------------------------------------------------------- /docs-src/0.6/src/router/reference/index.md: -------------------------------------------------------------------------------- 1 | # Adding the router to your application 2 | 3 | In this chapter, we will learn how to add the router to our app. By itself, this 4 | is not very useful. However, it is a prerequisite for all the functionality 5 | described in the other chapters. 6 | 7 | > Make sure you added the `dioxus-router` dependency as explained in the 8 | > [introduction](../index.md). 9 | 10 | In most cases, we want to add the router to the root component of our app. This 11 | way, we can ensure that we have access to all its functionality everywhere. 12 | 13 | First, we define the router with the router macro: 14 | 15 | ```rust 16 | {{#include src/doc_examples/first_route.rs:router}} 17 | ``` 18 | 19 | Then we render the router with the [`Router`] component. 20 | 21 | ```rust 22 | {{#include src/doc_examples/first_route.rs:app}} 23 | ``` 24 | -------------------------------------------------------------------------------- /docs-src/0.6/src/router/reference/redirects.md: -------------------------------------------------------------------------------- 1 | # Redirects 2 | 3 | In some cases, we may want to redirect our users to another page whenever they 4 | open a specific path. We can tell the router to do this with the `#[redirect]` 5 | attribute. 6 | 7 | The `#[redirect]` attribute accepts a route and a closure with all of the parameters defined in the route. The closure must return a [`NavigationTarget`]. 8 | 9 | In the following example, we will redirect everybody from `/myblog` and `/myblog/:id` to `/blog` and `/blog/:id` respectively 10 | 11 | ```rust 12 | {{#include src/doc_examples/full_example.rs:router}} 13 | ``` 14 | 15 | [`NavigationTarget`]: https://docs.rs/dioxus-router/latest/dioxus_router/navigation/enum.NavigationTarget.html -------------------------------------------------------------------------------- /docs-src/0.6/src/router/reference/static-generation.md: -------------------------------------------------------------------------------- 1 | # Static Generation 2 | 3 | ## Getting the Sitemap 4 | 5 | The [`Routable`] trait includes an associated [`SITE_MAP`] constant that contains the map of all of the routes in the enum. 6 | 7 | By default, the sitemap is a tree of (static or dynamic) RouteTypes, but it can be flattened into a list of individual routes with the `.flatten()` method. 8 | 9 | ## Generating a Sitemap 10 | 11 | To statically render pages, we need to flatten the route tree and generate a file for each route that contains only static segments: 12 | 13 | ```rust 14 | {{#include src/doc_examples/static_generation.rs}} 15 | ``` 16 | 17 | ## Example 18 | 19 | - [examples/static-hydrated](https://github.com/DioxusLabs/dioxus/tree/v0.5/packages/fullstack/examples/static-hydrated) 20 | 21 | [`Routable`]: https://docs.rs/dioxus-router/latest/dioxus_router/components/fn.Routable.html 22 | -------------------------------------------------------------------------------- /docs-src/blog/book.toml: -------------------------------------------------------------------------------- 1 | [book.en] 2 | title = "Dioxus Blog" 3 | description = "Blog posts about for the Dioxus docsite" 4 | authors = ["Jonathan Kelley"] 5 | language = "en" 6 | 7 | [language.en] 8 | name = "English" 9 | 10 | [rust] 11 | edition = "2021" 12 | 13 | [output.html] 14 | mathjax-support = true 15 | site-url = "/mdBook/" 16 | git-repository-url = "https://github.com/DioxusLabs/dioxus/edit/main/docs-src/blog" 17 | edit-url-template = "https://github.com/DioxusLabs/dioxus/edit/main/docs-src/blog/{path}" 18 | 19 | # running examples will not work because dioxus is not a included in the playground 20 | [output.html.playground] 21 | editable = true 22 | line-numbers = true 23 | runnable = false 24 | 25 | [output.html.search] 26 | limit-results = 20 27 | use-boolean-and = true 28 | boost-title = 2 29 | boost-hierarchy = 2 30 | boost-paragraph = 1 31 | expand = true 32 | heading-split-level = 2 33 | -------------------------------------------------------------------------------- /packages/docs-router/README.md: -------------------------------------------------------------------------------- 1 | # the router used by the docsite 2 | 3 | This crate performs the codegen that transforms the markdown files into rsx. 4 | 5 | Unfortunately, the codegen takes a while, so we needed to move it out into its own crate. 6 | 7 | -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/android-dogapp.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/android-dogapp.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/default_dioxus_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/default_dioxus_app.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/deploy_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/deploy_screenshot.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/diffing_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/diffing_diagram.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/dog-app-ios.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/dog-app-ios.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/dog-asset-hotreload.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/dog-asset-hotreload.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/dog-save-serverfn.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/dog-save-serverfn.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/dog_app_hotreload.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/dog_app_hotreload.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/dog_app_styled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/dog_app_styled.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/dx_new_06.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/dx_new_06.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/dx_serve_06.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/dx_serve_06.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/ebou-following.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/ebou-following.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/fetch-dog.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/fetch-dog.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/fly-deployed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/fly-deployed.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/fly_deploy.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/fly_deploy.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/fly_launch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/fly_launch.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/full-crossplatform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/full-crossplatform.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/hotdog-db-view.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/hotdog-db-view.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/hotdog-desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/hotdog-desktop.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/hotdog-interactivity.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/hotdog-interactivity.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/hotdog_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/hotdog_loading.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/hotdogfull.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/hotdogfull.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/no_navbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/no_navbar.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/routeroutlet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/routeroutlet.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/serve_with_fullstack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/serve_with_fullstack.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/server_split.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/server_split.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/serving_server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/serving_server.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/ssg_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/ssg_folder.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/streaming_dogs.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/streaming_dogs.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06_docs/unstyled_dog_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06_docs/unstyled_dog_app.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/355903878-ebcb5872-acf7-4e29-8acb-5b183b0617ca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/355903878-ebcb5872-acf7-4e29-8acb-5b183b0617ca.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_10.22.48_PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_10.22.48_PM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_10.38.33_PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_10.38.33_PM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_10.40.56_PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_10.40.56_PM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_11.28.42_PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_11.28.42_PM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_11.31.18_PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_11.31.18_PM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_11.35.23_PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_11.35.23_PM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_8.52.18_PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_8.52.18_PM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_9.01.18_PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_9.01.18_PM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_9.06.05_PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_9.06.05_PM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_9.41.38_PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_9.41.38_PM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_9.42.33_PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_9.42.33_PM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_9.50.33_PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_9.50.33_PM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_9.55.12_PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-14_at_9.55.12_PM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-15_at_1.02.23_AM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-15_at_1.02.23_AM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-15_at_1.04.13_AM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-15_at_1.04.13_AM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/Screenshot_2024-11-15_at_1.05.03_AM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/Screenshot_2024-11-15_at_1.05.03_AM.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/autocomplete-overhaul.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/autocomplete-overhaul.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/breadcrumbs_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/breadcrumbs_shadow.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/bundled-ios-reload.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/bundled-ios-reload.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/cli-new.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/cli-new.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/dogapphr2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/dogapphr2.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/dxnew.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/dxnew.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/full_hr_dioxus_fast.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/full_hr_dioxus_fast.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/image.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/image1.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/interacitve_widget_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/interacitve_widget_shadow.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/manganis-opt.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/manganis-opt.avif -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/native-serverfn12.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/native-serverfn12.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/onvisible.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/onvisible.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/prop-hotreload.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/prop-hotreload.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/streamingsuspense.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/streamingsuspense.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/toasts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/toasts.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/version_switch_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/version_switch_shadow.png -------------------------------------------------------------------------------- /packages/docs-router/assets/06assets/wgpu-windows.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/06assets/wgpu-windows.mp4 -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/diffing/bump-alloc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/diffing/bump-alloc.png -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/diffing/elixir.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/diffing/elixir.jpeg -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/diffing/jsframework-diffing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/diffing/jsframework-diffing.png -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/release-03/compiletimecorrect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/release-03/compiletimecorrect.png -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/release-03/component_borrowed_props_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/release-03/component_borrowed_props_screenshot.png -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/release-03/component_owned_props_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/release-03/component_owned_props_screenshot.png -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/release-03/component_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/release-03/component_tree.png -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/release-03/counter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/release-03/counter.png -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/release-03/counter_two_state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/release-03/counter_two_state.png -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/release-03/diffing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/release-03/diffing.png -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/release-03/dioxuslogo_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/release-03/dioxuslogo_full.png -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/release-03/meme_editor_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/release-03/meme_editor_screenshot.png -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/release-03/oldnew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/release-03/oldnew.png -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/release-03/publish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/release-03/publish.png -------------------------------------------------------------------------------- /packages/docs-router/assets/blog/release-03/screenshot_about_component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/blog/release-03/screenshot_about_component.png -------------------------------------------------------------------------------- /packages/docs-router/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/icon.png -------------------------------------------------------------------------------- /packages/docs-router/assets/main.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/main.css -------------------------------------------------------------------------------- /packages/docs-router/assets/static/04meme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/04meme.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/Android-Dioxus-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/Android-Dioxus-demo.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/IOS-dioxus-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/IOS-dioxus-demo.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/Untitled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/Untitled.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/android-studio-device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/android-studio-device.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/android-studio-devices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/android-studio-devices.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/android-studio-simulator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/android-studio-simulator.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/android_demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/android_demo.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/android_ndk_install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/android_ndk_install.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/as-build-dropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/as-build-dropdown.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/as-build-variant-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/as-build-variant-menu.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/bundle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/bundle.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/counter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/counter.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/dioxus-app-stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/dioxus-app-stack.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/dioxus-architecture-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/dioxus-architecture-diagram.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/dxcheck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/dxcheck.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/enum_router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/enum_router.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/extension.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/extension.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/ferrous_wave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/ferrous_wave.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/ide_autocomplete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/ide_autocomplete.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/ide_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/ide_hover.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/ide_listener.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/ide_listener.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/ide_rsx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/ide_rsx.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/ide_selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/ide_selection.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/ios_demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/ios_demo.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/landing_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/landing_1.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/landing_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/landing_2.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/landing_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/landing_3.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/landing_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/landing_4.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/landing_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/landing_5.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/meme_editor_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/meme_editor_screenshot.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/new_fetch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/new_fetch.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/old_fetch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/old_fetch.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/publish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/publish.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/scanner.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/scanner.avif -------------------------------------------------------------------------------- /packages/docs-router/assets/static/scanner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/scanner.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/split_codegen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/split_codegen.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/tailwind_desktop_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/tailwind_desktop_app.png -------------------------------------------------------------------------------- /packages/docs-router/assets/static/workspace-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/static/workspace-graph.png -------------------------------------------------------------------------------- /packages/docs-router/assets/tailwind.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docs-router/assets/tailwind.css -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/boolean_attribute.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | pub fn App() -> Element { 5 | // ANCHOR: boolean_attribute 6 | rsx! { 7 | div { hidden: false, "hello" } 8 | } 9 | // ANCHOR_END: boolean_attribute 10 | } 11 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/catch_all_segments.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | use dioxus::prelude::*; 3 | use dioxus_router::prelude::*; 4 | 5 | // ANCHOR: route 6 | #[derive(Routable, Clone)] 7 | #[rustfmt::skip] 8 | enum Route { 9 | // segments that start with :.. are catch all segments 10 | #[route("/blog/:..segments")] 11 | BlogPost { 12 | // You must include catch all segment in child variants 13 | segments: Vec, 14 | }, 15 | } 16 | 17 | // Components must contain the same catch all segments as their corresponding variant 18 | #[component] 19 | fn BlogPost(segments: Vec) -> Element { 20 | todo!() 21 | } 22 | // ANCHOR_END: route 23 | 24 | fn main() {} 25 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/component_children.rs: -------------------------------------------------------------------------------- 1 | // ANCHOR: all 2 | #![allow(non_snake_case)] 3 | use dioxus::prelude::*; 4 | 5 | pub fn App() -> Element { 6 | // ANCHOR: Clickable_usage 7 | rsx! { 8 | Clickable { href: "https://www.youtube.com/watch?v=C-M2hs3sXGo", 9 | "How to " 10 | i { "not" } 11 | " be seen" 12 | } 13 | } 14 | // ANCHOR_END: Clickable_usage 15 | } 16 | 17 | // ANCHOR: Clickable 18 | #[derive(PartialEq, Clone, Props)] 19 | struct ClickableProps { 20 | href: String, 21 | children: Element, 22 | } 23 | 24 | fn Clickable(props: ClickableProps) -> Element { 25 | rsx! { 26 | a { href: "{props.href}", class: "fancy-button", {props.children} } 27 | } 28 | } 29 | // ANCHOR_END: Clickable 30 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/component_children_inspect.rs: -------------------------------------------------------------------------------- 1 | // ANCHOR: all 2 | #![allow(non_snake_case, unused)] 3 | use dioxus::prelude::*; 4 | 5 | fn main() { 6 | dioxus::launch(App); 7 | } 8 | 9 | fn App() -> Element { 10 | // ANCHOR: Clickable_usage 11 | rsx! { 12 | Clickable { href: "https://www.youtube.com/watch?v=C-M2hs3sXGo", 13 | "How to " 14 | i { "not" } 15 | " be seen" 16 | } 17 | } 18 | // ANCHOR_END: Clickable_usage 19 | } 20 | 21 | #[derive(PartialEq, Clone, Props)] 22 | struct ClickableProps { 23 | href: String, 24 | children: Element, 25 | } 26 | 27 | // ANCHOR: Clickable 28 | fn Clickable(props: ClickableProps) -> Element { 29 | rsx! { 30 | div { class: "wrapper", {props.children} } 31 | } 32 | } 33 | // ANCHOR_END: Clickable 34 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/component_element_props.rs: -------------------------------------------------------------------------------- 1 | // ANCHOR: all 2 | #![allow(non_snake_case)] 3 | use dioxus::prelude::*; 4 | 5 | fn main() { 6 | launch(App); 7 | } 8 | 9 | fn App() -> Element { 10 | // ANCHOR: Clickable_usage 11 | rsx! { 12 | Clickable { 13 | href: "https://www.youtube.com/watch?v=C-M2hs3sXGo", 14 | body: rsx! { 15 | "How to " i { "not" } " be seen" 16 | } 17 | } 18 | } 19 | // ANCHOR_END: Clickable_usage 20 | } 21 | 22 | // ANCHOR: Clickable 23 | #[derive(PartialEq, Clone, Props)] 24 | struct ClickableProps { 25 | href: String, 26 | body: Element, 27 | } 28 | 29 | fn Clickable(props: ClickableProps) -> Element { 30 | rsx! { 31 | a { href: "{props.href}", class: "fancy-button", {props.body} } 32 | } 33 | } 34 | // ANCHOR_END: Clickable 35 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/component_owned_props.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: App 5 | pub fn App() -> Element { 6 | rsx! { Likes { score: 42 } } 7 | } 8 | // ANCHOR_END: App 9 | 10 | // ANCHOR: Likes 11 | #[derive(PartialEq, Props, Clone)] 12 | struct LikesProps { 13 | score: i32, 14 | } 15 | 16 | fn Likes(props: LikesProps) -> Element { 17 | rsx! { 18 | div { 19 | "This post has " 20 | b { "{props.score}" } 21 | " likes" 22 | } 23 | } 24 | } 25 | // ANCHOR_END: Likes 26 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/component_test.rs: -------------------------------------------------------------------------------- 1 | use futures::FutureExt; 2 | use std::{cell::RefCell, sync::Arc}; 3 | 4 | use dioxus::prelude::*; 5 | 6 | #[test] 7 | fn test() { 8 | assert_rsx_eq( 9 | rsx! { 10 | div { "Hello world" } 11 | div { "Hello world" } 12 | }, 13 | rsx! { 14 | for _ in 0..2 { 15 | div { "Hello world" } 16 | } 17 | }, 18 | ) 19 | } 20 | 21 | fn assert_rsx_eq(first: Element, second: Element) { 22 | let first = dioxus_ssr::render_element(first); 23 | let second = dioxus_ssr::render_element(second); 24 | pretty_assertions::assert_str_eq!(first, second); 25 | } 26 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/components.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: App 5 | pub fn App() -> Element { 6 | rsx! { 7 | About {} 8 | About {} 9 | } 10 | } 11 | // ANCHOR_END: App 12 | 13 | // ANCHOR: About 14 | pub fn About() -> Element { 15 | rsx! { 16 | p { 17 | b { "Dioxus Labs" } 18 | " An Open Source project dedicated to making Rust UI wonderful." 19 | } 20 | } 21 | } 22 | // ANCHOR_END: About 23 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/custom_assets.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | fn main() { 4 | launch(app); 5 | } 6 | 7 | fn app() -> Element { 8 | rsx! { 9 | div { 10 | img { src: asset!("/assets/static/scanner.png") } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/custom_renderer.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/dangerous_inner_html.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | pub fn App() -> Element { 5 | // ANCHOR: dangerous_inner_html 6 | // this should come from a trusted source 7 | let contents = "live dangerously"; 8 | 9 | rsx! { 10 | div { dangerous_inner_html: "{contents}" } 11 | } 12 | // ANCHOR_END: dangerous_inner_html 13 | } 14 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/event_click.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | pub fn App() -> Element { 5 | // ANCHOR: rsx 6 | rsx! { 7 | button { onclick: move |event| log::info!("Clicked! Event: {event:?}"), "click me!" } 8 | } 9 | // ANCHOR_END: rsx 10 | } 11 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/event_nested.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | launch(App); 6 | } 7 | 8 | fn App() -> Element { 9 | // ANCHOR: rsx 10 | rsx! { 11 | div { onclick: move |_event| {}, 12 | "outer" 13 | button { 14 | onclick: move |event| { 15 | event.stop_propagation(); 16 | }, 17 | "inner" 18 | } 19 | } 20 | } 21 | // ANCHOR_END: rsx 22 | } 23 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/event_prevent_default.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | pub fn App() -> Element { 5 | // ANCHOR: prevent_default 6 | rsx! { 7 | a { 8 | href: "https://example.com", 9 | onclick: |evt| { 10 | evt.prevent_default(); 11 | log::info!("link clicked") 12 | }, 13 | "example.com" 14 | } 15 | } 16 | // ANCHOR_END: prevent_default 17 | } 18 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/external_link.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | 3 | use dioxus::prelude::*; 4 | use dioxus_router::prelude::*; 5 | 6 | #[derive(Routable, Clone)] 7 | enum Route { 8 | #[route("/")] 9 | Home {}, 10 | } 11 | 12 | #[component] 13 | fn Home() -> Element { 14 | todo!() 15 | } 16 | 17 | fn main() {} 18 | 19 | // ANCHOR: component 20 | fn GoToDioxus() -> Element { 21 | rsx! { 22 | Link { to: "https://dioxuslabs.com", "ExternalTarget target" } 23 | } 24 | } 25 | // ANCHOR_END: component 26 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/first_route.rs: -------------------------------------------------------------------------------- 1 | // ANCHOR: router 2 | #![allow(non_snake_case)] 3 | use dioxus::prelude::*; 4 | use dioxus_router::prelude::*; 5 | 6 | /// An enum of all of the possible routes in the app. 7 | #[derive(Routable, Clone)] 8 | enum Route { 9 | // The home page is at the / route 10 | #[route("/")] 11 | Home {}, 12 | } 13 | // ANCHOR_END: router 14 | 15 | // ANCHOR: app 16 | fn App() -> Element { 17 | rsx! { Router:: {} } 18 | } 19 | // ANCHOR_END: app 20 | 21 | // ANCHOR: home 22 | #[component] 23 | fn Home() -> Element { 24 | rsx! { h1 { "Welcome to the Dioxus Blog!" } } 25 | } 26 | // ANCHOR_END: home 27 | 28 | fn main() {} 29 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/guide_deploy.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | fn App() -> Element { 4 | todo!() 5 | } 6 | 7 | // ANCHOR: set_server_url 8 | fn main() { 9 | #[cfg(not(feature = "server"))] 10 | server_fn::client::set_server_url("https://hot-dog.fly.dev"); 11 | 12 | dioxus::launch(App); 13 | } 14 | // ANCHOR_END: set_server_url 15 | 16 | // ANCHOR: stable_server_endpoints 17 | #[server(endpoint = "list_dogs")] 18 | pub async fn list_dogs() -> Result, ServerFnError> { 19 | todo!() 20 | } 21 | 22 | #[server(endpoint = "remove_dog")] 23 | pub async fn remove_dog(id: usize) -> Result<(), ServerFnError> { 24 | todo!() 25 | } 26 | 27 | #[server(endpoint = "save_dog")] 28 | pub async fn save_dog(image: String) -> Result<(), ServerFnError> { 29 | todo!() 30 | } 31 | // ANCHOR_END: stable_server_endpoints 32 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/guide_new_app.rs: -------------------------------------------------------------------------------- 1 | mod new_app { 2 | fn App() -> Element { 3 | todo!() 4 | } 5 | 6 | // ANCHOR: new_app 7 | use dioxus::prelude::*; 8 | 9 | fn main() { 10 | dioxus::launch(App); 11 | } 12 | // ANCHOR_END: new_app 13 | } 14 | 15 | mod new_app_full { 16 | // ANCHOR: new_app_full 17 | use dioxus::prelude::*; 18 | 19 | fn main() { 20 | dioxus::launch(App); 21 | } 22 | 23 | #[component] 24 | fn App() -> Element { 25 | rsx! { "HotDog!" } 26 | } 27 | // ANCHOR_END: new_app_full 28 | } 29 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/hello_world.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | 3 | use dioxus::prelude::*; 4 | 5 | pub fn HelloWorldCounter() -> Element { 6 | rsx! { 7 | div { "Hello, world!" } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/hello_world_desktop.rs: -------------------------------------------------------------------------------- 1 | // ANCHOR: all 2 | #![allow(non_snake_case)] 3 | // import the prelude to get access to the `rsx!` macro and the `Element` type 4 | use dioxus::prelude::*; 5 | 6 | fn main() { 7 | // launch the dioxus app in a webview 8 | launch(App); 9 | } 10 | 11 | // ANCHOR: component 12 | // define a component that renders a div with the text "Hello, world!" 13 | fn App() -> Element { 14 | rsx! { 15 | div { "Hello, world!" } 16 | } 17 | } 18 | // ANCHOR_END: component 19 | // ANCHOR_END: all 20 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/hello_world_liveview.rs: -------------------------------------------------------------------------------- 1 | // ANCHOR: all 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | launch(app); 6 | } 7 | 8 | fn app() -> Element { 9 | rsx! { 10 | div { "Hello, world!" } 11 | } 12 | } 13 | // ANCHOR_END: all 14 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/hello_world_web.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | // import the prelude to get access to the `rsx!` macro and the `Element` type 3 | use dioxus::prelude::*; 4 | 5 | fn main() { 6 | // launch the web app 7 | launch(App); 8 | } 9 | 10 | // create a component that renders a div with the text "Hello, world!" 11 | fn App() -> Element { 12 | rsx! { 13 | div { "Hello, world!" } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/history_buttons.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | use dioxus::prelude::*; 3 | use dioxus_router::prelude::*; 4 | 5 | #[derive(Routable, Clone)] 6 | #[rustfmt::skip] 7 | enum Route { 8 | #[route("/")] 9 | Home {}, 10 | } 11 | 12 | #[component] 13 | fn Home() -> Element { 14 | todo!() 15 | } 16 | 17 | // ANCHOR: history_buttons 18 | fn HistoryNavigation() -> Element { 19 | rsx! { 20 | GoBackButton { "Back to the Past" } 21 | GoForwardButton { "Back to the Future" } 22 | } 23 | } 24 | // ANCHOR_END: history_buttons 25 | 26 | fn main() {} 27 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/history_provider.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | use dioxus_router::prelude::*; 4 | 5 | #[derive(Routable, Clone)] 6 | enum Route { 7 | #[route("/")] 8 | Home {}, 9 | } 10 | 11 | // ANCHOR: app 12 | #[component] 13 | fn App() -> Element { 14 | rsx! { 15 | Router:: { config: || RouterConfig::default() } 16 | } 17 | } 18 | // ANCHOR_END: app 19 | 20 | #[component] 21 | fn Home() -> Element { 22 | rsx! { 23 | h1 { "Welcome to the Dioxus Blog!" } 24 | } 25 | } 26 | 27 | fn main() {} 28 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/hooks_counter.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: component 5 | pub fn App() -> Element { 6 | // count will be initialized to 0 the first time the component is rendered 7 | let mut count = use_signal(|| 0); 8 | 9 | rsx! { 10 | h1 { "High-Five counter: {count}" } 11 | button { onclick: move |_| count += 1, "Up high!" } 12 | button { onclick: move |_| count -= 1, "Down low!" } 13 | } 14 | } 15 | // ANCHOR_END: component 16 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/hooks_counter_two_state.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: component 5 | pub fn App() -> Element { 6 | // ANCHOR: use_signal_calls 7 | let mut count_a = use_signal(|| 0); 8 | let mut count_b = use_signal(|| 0); 9 | // ANCHOR_END: use_signal_calls 10 | 11 | rsx! { 12 | h1 { "Counter_a: {count_a}" } 13 | button { onclick: move |_| count_a += 1, "a++" } 14 | button { onclick: move |_| count_a -= 1, "a--" } 15 | h1 { "Counter_b: {count_b}" } 16 | button { onclick: move |_| count_b += 1, "b++" } 17 | button { onclick: move |_| count_b -= 1, "b--" } 18 | } 19 | } 20 | // ANCHOR_END: component 21 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/hooks_use_signal.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: component 5 | pub fn App() -> Element { 6 | let mut list = use_signal(Vec::new); 7 | 8 | rsx! { 9 | p { "Current list: {list:?}" } 10 | button { 11 | onclick: move |event| { 12 | let list_len = list.len(); 13 | list.push(list_len); 14 | list.push(list_len); 15 | }, 16 | "Add two elements!" 17 | } 18 | } 19 | } 20 | // ANCHOR_END: component 21 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/input_controlled.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: component 5 | pub fn App() -> Element { 6 | let mut name = use_signal(|| "bob".to_string()); 7 | 8 | rsx! { 9 | input { 10 | // we tell the component what to render 11 | value: "{name}", 12 | // and what to do when the value changes 13 | oninput: move |event| name.set(event.value()) 14 | } 15 | } 16 | } 17 | // ANCHOR_END: component 18 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/input_fileengine_folder.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: component 5 | pub fn App() -> Element { 6 | let filenames: Signal> = use_signal(Vec::new); 7 | rsx! { 8 | // ANCHOR: rsx 9 | input { 10 | r#type: "file", 11 | // Select a folder by setting the directory attribute 12 | directory: true, 13 | onchange: move |evt| { 14 | if let Some(file_engine) = evt.files() { 15 | let files = file_engine.files(); 16 | for file_name in files { 17 | println!("{}", file_name); 18 | } 19 | } 20 | } 21 | } 22 | // ANCHOR_END: rsx 23 | } 24 | } 25 | // ANCHOR_END: component 26 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/input_uncontrolled.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: component 5 | pub fn App() -> Element { 6 | rsx! { 7 | form { onsubmit: move |event| { log::info!("Submitted! {event:?}") }, 8 | input { name: "name" } 9 | input { name: "age" } 10 | input { name: "date" } 11 | input { r#type: "submit" } 12 | } 13 | } 14 | } 15 | // ANCHOR_END: component 16 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/query_segments.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | use std::fmt::Display; 3 | 4 | use dioxus::prelude::*; 5 | use dioxus_router::prelude::*; 6 | 7 | // ANCHOR: route 8 | #[derive(Routable, Clone)] 9 | #[rustfmt::skip] 10 | enum Route { 11 | // segments that start with ?: are query segments 12 | #[route("/blog?:name&:surname")] 13 | BlogPost { 14 | // You must include query segments in child variants 15 | name: String, 16 | surname: String, 17 | }, 18 | } 19 | 20 | #[component] 21 | fn BlogPost(name: String, surname: String) -> Element { 22 | rsx! { 23 | div { "This is your blogpost with a query segment:" } 24 | div { "Name: {name}" } 25 | div { "Surname: {surname}" } 26 | } 27 | } 28 | 29 | fn App() -> Element { 30 | rsx! { Router:: {} } 31 | } 32 | 33 | fn main() {} 34 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/readme.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | pub fn App() -> Element { 4 | let mut count = use_signal(|| 0); 5 | 6 | rsx! { 7 | h1 { "High-Five counter: {count}" } 8 | button { onclick: move |_| count += 1, "Up high!" } 9 | button { onclick: move |_| count -= 1, "Down low!" } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/router_cfg.rs: -------------------------------------------------------------------------------- 1 | // ANCHOR: router 2 | #![allow(non_snake_case)] 3 | use dioxus::prelude::*; 4 | use dioxus_router::prelude::*; 5 | 6 | /// An enum of all of the possible routes in the app. 7 | #[derive(Routable, Clone)] 8 | enum Route { 9 | // The home page is at the / route 10 | #[route("/")] 11 | Home {}, 12 | } 13 | // ANCHOR_END: router 14 | 15 | // ANCHOR: app 16 | #[component] 17 | fn App() -> Element { 18 | rsx! { 19 | Router:: { config: || RouterConfig::default() } 20 | } 21 | } 22 | // ANCHOR_END: app 23 | 24 | // ANCHOR: home 25 | #[component] 26 | fn Home() -> Element { 27 | rsx! { 28 | h1 { "Welcome to the Dioxus Blog!" } 29 | } 30 | } 31 | // ANCHOR_END: home 32 | 33 | fn main() {} 34 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/server_basic.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | launch(app) 6 | } 7 | 8 | fn app() -> Element { 9 | let mut count = use_signal(|| 0); 10 | 11 | rsx! { 12 | h1 { "High-Five counter: {count}" } 13 | button { onclick: move |_| count += 1, "Up high!" } 14 | button { onclick: move |_| count -= 1, "Down low!" } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/server_data_fetch.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | 3 | use dioxus::prelude::*; 4 | 5 | fn main() { 6 | launch(app) 7 | } 8 | 9 | fn app() -> Element { 10 | let mut count = use_resource(get_server_data); 11 | 12 | rsx! {"server data is {count.value():?}"} 13 | } 14 | 15 | #[server] 16 | async fn get_server_data() -> Result { 17 | // Access a database 18 | tokio::time::sleep(std::time::Duration::from_millis(100)).await; 19 | Ok("Hello from the server!".to_string()) 20 | } 21 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/server_data_prefetch.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | 3 | use dioxus::prelude::*; 4 | 5 | fn main() { 6 | launch(app); 7 | } 8 | 9 | fn app() -> Element { 10 | let mut count = use_server_future(get_server_data)?; 11 | 12 | rsx! {"server data is {count.value():?}"} 13 | } 14 | 15 | #[server] 16 | async fn get_server_data() -> Result { 17 | // Access a database 18 | tokio::time::sleep(std::time::Duration::from_millis(100)).await; 19 | Ok("Hello from the server!".to_string()) 20 | } 21 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/server_function_desktop_client.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: server_function 5 | #[server(GetServerData)] 6 | async fn get_server_data() -> Result { 7 | Ok("Hello from the server!".to_string()) 8 | } 9 | // ANCHOR_END: server_function 10 | 11 | use dioxus::prelude::*; 12 | 13 | #[tokio::main] 14 | async fn main() { 15 | // ANCHOR: server_url 16 | let listener = tokio::net::TcpListener::bind("127.0.0.1:3000") 17 | .await 18 | .unwrap(); 19 | println!("listening on http://127.0.0.1:3000"); 20 | // ANCHOR_END: server_url 21 | } 22 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/server_function_extract.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: server_function_extract 5 | #[server] 6 | pub async fn log_headers() -> Result<(), ServerFnError> { 7 | let headers: http::HeaderMap = extract().await?; 8 | log::info!("{:?}", headers[http::header::USER_AGENT]); 9 | Ok(()) 10 | } 11 | // ANCHOR_END: server_function_extract 12 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/server_function_middleware.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: server_function_middleware 5 | #[server] 6 | // Add a timeout middleware to the server function that will return an error if the function takes longer than 1 second to execute 7 | #[middleware(tower_http::timeout::TimeoutLayer::new(std::time::Duration::from_secs(1)))] 8 | pub async fn timeout() -> Result<(), ServerFnError> { 9 | tokio::time::sleep(std::time::Duration::from_secs(2)).await; 10 | Ok(()) 11 | } 12 | // ANCHOR_END: server_function_middleware 13 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/static_segments.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | use dioxus_router::prelude::*; 4 | 5 | // ANCHOR: route 6 | #[derive(Routable, Clone)] 7 | #[rustfmt::skip] 8 | enum Route { 9 | // Routes always start with a slash 10 | #[route("/")] 11 | Home {}, 12 | // You can have multiple segments in a route 13 | #[route("/hello/world")] 14 | HelloWorld {}, 15 | } 16 | 17 | #[component] 18 | fn Home() -> Element { 19 | todo!() 20 | } 21 | 22 | #[component] 23 | fn HelloWorld() -> Element { 24 | todo!() 25 | } 26 | // ANCHOR_END: route 27 | 28 | fn main() {} 29 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/sync_signal.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | fn main() { 4 | launch(app); 5 | } 6 | 7 | fn app() -> Element { 8 | let mut signal = use_signal_sync(|| 0); 9 | 10 | use_hook(|| { 11 | std::thread::spawn(move || loop { 12 | std::thread::sleep(std::time::Duration::from_secs(1)); 13 | // You can easily update the signal from a different thread 14 | signal += 1; 15 | }); 16 | }); 17 | 18 | rsx! { 19 | button { onclick: move |_| signal += 1, "Increase" } 20 | "{signal}" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/tailwind.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | #[component] 4 | fn app() -> Element { 5 | rsx! { 6 | // The Stylesheet component inserts a style link into the head of the document 7 | document::Stylesheet { 8 | // Urls are relative to your Cargo.toml file 9 | href: asset!("/assets/tailwind.css") 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/Readme.md: -------------------------------------------------------------------------------- 1 | Some of these examples (e.g. web) cannot be run. The code samples are here mostly so that we can easily check that they compile using `cargo test`. -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/boolean_attribute.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | dioxus_desktop::launch(App); 6 | } 7 | 8 | #[rustfmt::skip] 9 | fn App(cx: Scope) -> Element { 10 | // ANCHOR: boolean_attribute 11 | cx.render(rsx! { 12 | div { 13 | hidden: "false", 14 | "hello" 15 | } 16 | }) 17 | // ANCHOR_END: boolean_attribute 18 | } 19 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/component_borrowed_props.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | dioxus_desktop::launch(App); 6 | } 7 | 8 | // ANCHOR: App 9 | fn App(cx: Scope) -> Element { 10 | let hello = "Hello Dioxus!"; 11 | 12 | cx.render(rsx!(TitleCard { title: hello })) 13 | } 14 | // ANCHOR_END: App 15 | 16 | // ANCHOR: TitleCard 17 | #[derive(Props)] 18 | struct TitleCardProps<'a> { 19 | title: &'a str, 20 | } 21 | 22 | fn TitleCard<'a>(cx: Scope<'a, TitleCardProps<'a>>) -> Element { 23 | cx.render(rsx! { 24 | h1 { "{cx.props.title}" } 25 | }) 26 | } 27 | // ANCHOR_END: TitleCard 28 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/component_owned_props.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | dioxus_desktop::launch(App); 6 | } 7 | 8 | // ANCHOR: App 9 | fn App(cx: Scope) -> Element { 10 | cx.render(rsx! { 11 | Likes { 12 | score: 42, 13 | }, 14 | }) 15 | } 16 | // ANCHOR_END: App 17 | 18 | // ANCHOR: Likes 19 | // Remember: Owned props must implement `PartialEq`! 20 | #[derive(PartialEq, Props)] 21 | struct LikesProps { 22 | score: i32, 23 | } 24 | 25 | fn Likes(cx: Scope) -> Element { 26 | cx.render(rsx! { 27 | div { 28 | "This post has ", 29 | b { "{cx.props.score}" }, 30 | " likes" 31 | } 32 | }) 33 | } 34 | // ANCHOR_END: Likes 35 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/components.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | dioxus_desktop::launch(App); 6 | } 7 | 8 | // ANCHOR: App 9 | fn App(cx: Scope) -> Element { 10 | cx.render(rsx! { 11 | About {}, 12 | About {}, 13 | }) 14 | } 15 | // ANCHOR_END: App 16 | 17 | // ANCHOR: About 18 | pub fn About(cx: Scope) -> Element { 19 | cx.render(rsx!(p { 20 | b {"Dioxus Labs"} 21 | " An Open Source project dedicated to making Rust UI wonderful." 22 | })) 23 | } 24 | // ANCHOR_END: About 25 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/dangerous_inner_html.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | dioxus_desktop::launch(App); 6 | } 7 | 8 | #[rustfmt::skip] 9 | fn App(cx: Scope) -> Element { 10 | // ANCHOR: dangerous_inner_html 11 | // this should come from a trusted source 12 | let contents = "live dangerously"; 13 | 14 | cx.render(rsx! { 15 | div { 16 | dangerous_inner_html: "{contents}", 17 | } 18 | }) 19 | // ANCHOR_END: dangerous_inner_html 20 | } 21 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/event_click.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | dioxus_desktop::launch(App); 6 | } 7 | 8 | #[rustfmt::skip] 9 | fn App(cx: Scope) -> Element { 10 | // ANCHOR: rsx 11 | cx.render(rsx! { 12 | button { 13 | onclick: move |event| println!("Clicked! Event: {event:?}"), 14 | "click me!" 15 | } 16 | }) 17 | // ANCHOR_END: rsx 18 | } 19 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/event_handler_prop.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | 3 | use dioxus::prelude::*; 4 | 5 | fn main() { 6 | dioxus_desktop::launch(App); 7 | } 8 | 9 | fn App(cx: Scope) -> Element { 10 | // ANCHOR: usage 11 | cx.render(rsx! { 12 | FancyButton { 13 | on_click: move |event| println!("Clicked! {event:?}") 14 | } 15 | }) 16 | // ANCHOR_END: usage 17 | } 18 | 19 | // ANCHOR: component_with_handler 20 | #[derive(Props)] 21 | pub struct FancyButtonProps<'a> { 22 | on_click: EventHandler<'a, MouseEvent>, 23 | } 24 | 25 | pub fn FancyButton<'a>(cx: Scope<'a, FancyButtonProps<'a>>) -> Element<'a> { 26 | cx.render(rsx!(button { 27 | class: "fancy-button", 28 | onclick: move |evt| cx.props.on_click.call(evt), 29 | "click me pls." 30 | })) 31 | } 32 | // ANCHOR_END: component_with_handler 33 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/event_nested.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | dioxus_desktop::launch(App); 6 | } 7 | 8 | #[rustfmt::skip] 9 | fn App(cx: Scope) -> Element { 10 | // ANCHOR: rsx 11 | cx.render(rsx! { 12 | div { 13 | onclick: move |_event| {}, 14 | "outer", 15 | button { 16 | onclick: move |event| { 17 | // now, outer won't be triggered 18 | event.stop_propagation(); 19 | }, 20 | "inner" 21 | } 22 | } 23 | }) 24 | // ANCHOR_END: rsx 25 | } 26 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/event_prevent_default.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | dioxus_desktop::launch(App); 6 | } 7 | 8 | #[rustfmt::skip] 9 | fn App(cx: Scope) -> Element { 10 | // ANCHOR: prevent_default 11 | cx.render(rsx! { 12 | input { 13 | prevent_default: "oninput", 14 | prevent_default: "onclick", 15 | } 16 | }) 17 | // ANCHOR_END: prevent_default 18 | } 19 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/hello_world_desktop.rs: -------------------------------------------------------------------------------- 1 | // ANCHOR: all 2 | #![allow(non_snake_case)] 3 | // import the prelude to get access to the `rsx!` macro and the `Scope` and `Element` types 4 | use dioxus::prelude::*; 5 | 6 | fn main() { 7 | // launch the dioxus app in a webview 8 | dioxus_desktop::launch(App); 9 | } 10 | 11 | // ANCHOR: component 12 | // define a component that renders a div with the text "Hello, world!" 13 | fn App(cx: Scope) -> Element { 14 | cx.render(rsx! { 15 | div { 16 | "Hello, world!" 17 | } 18 | }) 19 | } 20 | // ANCHOR_END: component 21 | // ANCHOR_END: all 22 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/hello_world_tui.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | // import the prelude to get access to the `rsx!` macro and the `Scope` and `Element` types 3 | use dioxus::prelude::*; 4 | 5 | fn main() { 6 | // launch the app in the terminal 7 | dioxus_tui::launch(App); 8 | } 9 | 10 | // create a component that renders a div with the text "Hello, world!" 11 | fn App(cx: Scope) -> Element { 12 | cx.render(rsx! { 13 | div { 14 | "Hello, world!" 15 | } 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/hello_world_web.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | // import the prelude to get access to the `rsx!` macro and the `Scope` and `Element` types 3 | use dioxus::prelude::*; 4 | 5 | fn main() { 6 | // launch the web app 7 | dioxus_web::launch(App); 8 | } 9 | 10 | // create a component that renders a div with the text "Hello, world!" 11 | fn App(cx: Scope) -> Element { 12 | cx.render(rsx! { 13 | div { 14 | "Hello, world!" 15 | } 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/hooks_composed.rs: -------------------------------------------------------------------------------- 1 | #![allow(unused)] 2 | 3 | use dioxus::prelude::*; 4 | 5 | fn main() {} 6 | 7 | struct AppSettings {} 8 | 9 | // ANCHOR: wrap_context 10 | fn use_settings(cx: &ScopeState) -> UseSharedState { 11 | use_shared_state::(cx).expect("App settings not provided") 12 | } 13 | // ANCHOR_END: wrap_context 14 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/hooks_counter_two_state.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | dioxus_desktop::launch(App); 6 | } 7 | 8 | // ANCHOR: component 9 | fn App(cx: Scope) -> Element { 10 | // ANCHOR: use_state_calls 11 | let mut count_a = use_state(cx, || 0); 12 | let mut count_b = use_state(cx, || 0); 13 | // ANCHOR_END: use_state_calls 14 | 15 | cx.render(rsx!( 16 | h1 { "Counter_a: {count_a}" } 17 | button { onclick: move |_| count_a += 1, "a++" } 18 | button { onclick: move |_| count_a -= 1, "a--" } 19 | h1 { "Counter_b: {count_b}" } 20 | button { onclick: move |_| count_b += 1, "b++" } 21 | button { onclick: move |_| count_b -= 1, "b--" } 22 | )) 23 | } 24 | // ANCHOR_END: component 25 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/hooks_use_ref.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | dioxus_desktop::launch(App); 6 | } 7 | 8 | // ANCHOR: component 9 | fn App(cx: Scope) -> Element { 10 | let list = use_ref(cx, Vec::new); 11 | 12 | cx.render(rsx!( 13 | p { "Current list: {list.read():?}" } 14 | button { 15 | onclick: move |event| { 16 | list.with_mut(|list| list.push(event)); 17 | }, 18 | "Click me!" 19 | } 20 | )) 21 | } 22 | // ANCHOR_END: component 23 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/input_controlled.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | dioxus_desktop::launch(App); 6 | } 7 | 8 | // ANCHOR: component 9 | fn App(cx: Scope) -> Element { 10 | let name = use_state(cx, || "bob".to_string()); 11 | 12 | cx.render(rsx! { 13 | input { 14 | // we tell the component what to render 15 | value: "{name}", 16 | // and what to do when the value changes 17 | oninput: move |evt| name.set(evt.value.clone()), 18 | } 19 | }) 20 | } 21 | // ANCHOR_END: component 22 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_03/input_uncontrolled.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | dioxus_desktop::launch(App); 6 | } 7 | 8 | // ANCHOR: component 9 | fn App(cx: Scope) -> Element { 10 | cx.render(rsx! { 11 | form { 12 | onsubmit: move |event| { 13 | println!("Submitted! {event:?}") 14 | }, 15 | input { name: "name", }, 16 | input { name: "age", }, 17 | input { name: "date", }, 18 | input { r#type: "submit", }, 19 | } 20 | }) 21 | } 22 | // ANCHOR_END: component 23 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/boolean_attribute.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | pub fn App(cx: Scope) -> Element { 5 | // ANCHOR: boolean_attribute 6 | cx.render(rsx! { 7 | div { 8 | hidden: false, 9 | "hello" 10 | } 11 | }) 12 | // ANCHOR_END: boolean_attribute 13 | } 14 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/catch_all_segments.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | use dioxus::prelude::*; 3 | use dioxus_router::prelude::*; 4 | 5 | // ANCHOR: route 6 | #[derive(Routable, Clone)] 7 | #[rustfmt::skip] 8 | enum Route { 9 | // segments that start with :.. are catch all segments 10 | #[route("/blog/:..segments")] 11 | BlogPost { 12 | // You must include catch all segment in child variants 13 | segments: Vec, 14 | }, 15 | } 16 | 17 | // Components must contain the same catch all segments as their corresponding variant 18 | #[component] 19 | fn BlogPost(cx: Scope, segments: Vec) -> Element { 20 | todo!() 21 | } 22 | // ANCHOR_END: route 23 | 24 | fn main() {} 25 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/component_borrowed_props.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: App 5 | pub fn App(cx: Scope) -> Element { 6 | let hello = "Hello Dioxus!"; 7 | 8 | cx.render(rsx!(TitleCard { title: hello })) 9 | } 10 | // ANCHOR_END: App 11 | 12 | // ANCHOR: TitleCard 13 | #[derive(Props)] 14 | struct TitleCardProps<'a> { 15 | title: &'a str, 16 | } 17 | 18 | fn TitleCard<'a>(cx: Scope<'a, TitleCardProps<'a>>) -> Element { 19 | cx.render(rsx! { 20 | h1 { "{cx.props.title}" } 21 | }) 22 | } 23 | // ANCHOR_END: TitleCard 24 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/component_children.rs: -------------------------------------------------------------------------------- 1 | // ANCHOR: all 2 | #![allow(non_snake_case)] 3 | use dioxus::prelude::*; 4 | 5 | pub fn App(cx: Scope) -> Element { 6 | // ANCHOR: Clickable_usage 7 | cx.render(rsx! { 8 | Clickable { 9 | href: "https://www.youtube.com/watch?v=C-M2hs3sXGo", 10 | "How to " i {"not"} " be seen" 11 | } 12 | }) 13 | // ANCHOR_END: Clickable_usage 14 | } 15 | 16 | // ANCHOR: Clickable 17 | #[derive(Props)] 18 | struct ClickableProps<'a> { 19 | href: &'a str, 20 | children: Element<'a>, 21 | } 22 | 23 | fn Clickable<'a>(cx: Scope<'a, ClickableProps<'a>>) -> Element { 24 | cx.render(rsx!( 25 | a { 26 | href: "{cx.props.href}", 27 | class: "fancy-button", 28 | &cx.props.children 29 | } 30 | )) 31 | } 32 | // ANCHOR_END: Clickable 33 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/component_owned_props.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: App 5 | pub fn App(cx: Scope) -> Element { 6 | cx.render(rsx! { 7 | Likes { 8 | score: 42, 9 | }, 10 | }) 11 | } 12 | // ANCHOR_END: App 13 | 14 | // ANCHOR: Likes 15 | // Remember: Owned props must implement `PartialEq`! 16 | #[derive(PartialEq, Props)] 17 | struct LikesProps { 18 | score: i32, 19 | } 20 | 21 | fn Likes(cx: Scope) -> Element { 22 | cx.render(rsx! { 23 | div { 24 | "This post has ", 25 | b { "{cx.props.score}" }, 26 | " likes" 27 | } 28 | }) 29 | } 30 | // ANCHOR_END: Likes 31 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/component_test.rs: -------------------------------------------------------------------------------- 1 | use futures::FutureExt; 2 | use std::{cell::RefCell, sync::Arc}; 3 | 4 | use dioxus::prelude::*; 5 | 6 | #[test] 7 | fn test() { 8 | assert_rsx_eq( 9 | rsx! { 10 | div { 11 | "Hello world" 12 | } 13 | div { 14 | "Hello world" 15 | } 16 | }, 17 | rsx! { 18 | for _ in 0..2 { 19 | div { 20 | "Hello world" 21 | } 22 | } 23 | }, 24 | ) 25 | } 26 | 27 | fn assert_rsx_eq(first: LazyNodes<'static, 'static>, second: LazyNodes<'static, 'static>) { 28 | let first = dioxus_ssr::render_lazy(first); 29 | let second = dioxus_ssr::render_lazy(second); 30 | pretty_assertions::assert_str_eq!(first, second); 31 | } 32 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/components.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: App 5 | pub fn App(cx: Scope) -> Element { 6 | cx.render(rsx! { 7 | About {}, 8 | About {}, 9 | }) 10 | } 11 | // ANCHOR_END: App 12 | 13 | // ANCHOR: About 14 | pub fn About(cx: Scope) -> Element { 15 | cx.render(rsx!(p { 16 | b {"Dioxus Labs"} 17 | " An Open Source project dedicated to making Rust UI wonderful." 18 | })) 19 | } 20 | // ANCHOR_END: About 21 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/custom_assets.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | fn main() { 4 | dioxus_desktop::launch(app); 5 | } 6 | 7 | fn app(cx: Scope) -> Element { 8 | cx.render(rsx! { 9 | div { 10 | img { src: "examples/assets/logo.png" } 11 | } 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/dangerous_inner_html.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | pub fn App(cx: Scope) -> Element { 5 | // ANCHOR: dangerous_inner_html 6 | // this should come from a trusted source 7 | let contents = "live dangerously"; 8 | 9 | cx.render(rsx! { 10 | div { 11 | dangerous_inner_html: "{contents}", 12 | } 13 | }) 14 | // ANCHOR_END: dangerous_inner_html 15 | } 16 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/event_click.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | pub fn App(cx: Scope) -> Element { 5 | // ANCHOR: rsx 6 | cx.render(rsx! { 7 | button { 8 | onclick: move |event| log::info!("Clicked! Event: {event:?}"), 9 | "click me!" 10 | } 11 | }) 12 | // ANCHOR_END: rsx 13 | } 14 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/event_nested.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | dioxus_desktop::launch(App); 6 | } 7 | 8 | fn App(cx: Scope) -> Element { 9 | // ANCHOR: rsx 10 | cx.render(rsx! { 11 | div { 12 | onclick: move |_event| {}, 13 | "outer", 14 | button { 15 | onclick: move |event| { 16 | // now, outer won't be triggered 17 | event.stop_propagation(); 18 | }, 19 | "inner" 20 | } 21 | } 22 | }) 23 | // ANCHOR_END: rsx 24 | } 25 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/event_prevent_default.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | pub fn App(cx: Scope) -> Element { 5 | // ANCHOR: prevent_default 6 | cx.render(rsx! { 7 | a { 8 | href: "https://example.com", 9 | prevent_default: "onclick", 10 | onclick: |_| log::info!("link clicked"), 11 | "example.com", 12 | } 13 | }) 14 | // ANCHOR_END: prevent_default 15 | } 16 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/external_link.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | 3 | use dioxus::prelude::*; 4 | use dioxus_router::prelude::*; 5 | 6 | #[derive(Routable, Clone)] 7 | enum Route { 8 | #[route("/")] 9 | Home {}, 10 | } 11 | 12 | #[component] 13 | fn Home(cx: Scope) -> Element { 14 | todo!() 15 | } 16 | 17 | fn main() {} 18 | 19 | // ANCHOR: component 20 | fn GoToDioxus(cx: Scope) -> Element { 21 | render! { 22 | Link { 23 | to: "https://dioxuslabs.com", 24 | "ExternalTarget target" 25 | } 26 | } 27 | } 28 | // ANCHOR_END: component 29 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/hello_world.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | 3 | use dioxus::prelude::*; 4 | 5 | pub fn HelloWorldCounter(cx: Scope) -> Element { 6 | cx.render(rsx! { 7 | div { 8 | "Hello, world!" 9 | } 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/hello_world_desktop.rs: -------------------------------------------------------------------------------- 1 | // ANCHOR: all 2 | #![allow(non_snake_case)] 3 | // import the prelude to get access to the `rsx!` macro and the `Scope` and `Element` types 4 | use dioxus::prelude::*; 5 | 6 | fn main() { 7 | // launch the dioxus app in a webview 8 | dioxus_desktop::launch(App); 9 | } 10 | 11 | // ANCHOR: component 12 | // define a component that renders a div with the text "Hello, world!" 13 | fn App(cx: Scope) -> Element { 14 | cx.render(rsx! { 15 | div { 16 | "Hello, world!" 17 | } 18 | }) 19 | } 20 | // ANCHOR_END: component 21 | // ANCHOR_END: all 22 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/hello_world_tui.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | // import the prelude to get access to the `rsx!` macro and the `Scope` and `Element` types 3 | use dioxus::prelude::*; 4 | 5 | fn main() { 6 | // launch the app in the terminal 7 | dioxus_tui::launch(App); 8 | } 9 | 10 | // create a component that renders a div with the text "Hello, world!" 11 | fn App(cx: Scope) -> Element { 12 | cx.render(rsx! { 13 | div { 14 | "Hello, world!" 15 | } 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/hello_world_web.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | // import the prelude to get access to the `rsx!` macro and the `Scope` and `Element` types 3 | use dioxus::prelude::*; 4 | 5 | fn main() { 6 | // launch the web app 7 | dioxus_web::launch(App); 8 | } 9 | 10 | // create a component that renders a div with the text "Hello, world!" 11 | fn App(cx: Scope) -> Element { 12 | cx.render(rsx! { 13 | div { 14 | "Hello, world!" 15 | } 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/history_buttons.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | use dioxus::prelude::*; 3 | use dioxus_router::prelude::*; 4 | 5 | #[derive(Routable, Clone)] 6 | #[rustfmt::skip] 7 | enum Route { 8 | #[route("/")] 9 | Home {}, 10 | } 11 | 12 | #[component] 13 | fn Home(cx: Scope) -> Element { 14 | todo!() 15 | } 16 | 17 | // ANCHOR: history_buttons 18 | fn HistoryNavigation(cx: Scope) -> Element { 19 | render! { 20 | GoBackButton { 21 | "Back to the Past" 22 | } 23 | GoForwardButton { 24 | "Back to the Future" /* You see what I did there? 😉 */ 25 | } 26 | } 27 | } 28 | // ANCHOR_END: history_buttons 29 | 30 | fn main() {} 31 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/history_provider.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | use dioxus_router::prelude::*; 4 | 5 | #[derive(Routable, Clone)] 6 | enum Route { 7 | #[route("/")] 8 | Home {}, 9 | } 10 | 11 | // ANCHOR: app 12 | #[component] 13 | fn App(cx: Scope) -> Element { 14 | render! { 15 | Router:: { 16 | config: || RouterConfig::default().history(WebHistory::default()) 17 | } 18 | } 19 | } 20 | // ANCHOR_END: app 21 | 22 | #[component] 23 | fn Home(cx: Scope) -> Element { 24 | render! { 25 | h1 { "Welcome to the Dioxus Blog!" } 26 | } 27 | } 28 | 29 | fn main() {} 30 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/hooks_counter.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: component 5 | pub fn App(cx: Scope) -> Element { 6 | // count will be initialized to 0 the first time the component is rendered 7 | let mut count = use_state(cx, || 0); 8 | 9 | cx.render(rsx!( 10 | h1 { "High-Five counter: {count}" } 11 | button { 12 | onclick: move |_| { 13 | // changing the count will cause the component to re-render 14 | count += 1 15 | }, 16 | "Up high!" 17 | } 18 | button { 19 | onclick: move |_| { 20 | // changing the count will cause the component to re-render 21 | count -= 1 22 | }, 23 | "Down low!" 24 | } 25 | )) 26 | } 27 | // ANCHOR_END: component 28 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/hooks_counter_two_state.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: component 5 | pub fn App(cx: Scope) -> Element { 6 | // ANCHOR: use_state_calls 7 | let mut count_a = use_state(cx, || 0); 8 | let mut count_b = use_state(cx, || 0); 9 | // ANCHOR_END: use_state_calls 10 | 11 | cx.render(rsx!( 12 | h1 { "Counter_a: {count_a}" } 13 | button { onclick: move |_| count_a += 1, "a++" } 14 | button { onclick: move |_| count_a -= 1, "a--" } 15 | h1 { "Counter_b: {count_b}" } 16 | button { onclick: move |_| count_b += 1, "b++" } 17 | button { onclick: move |_| count_b -= 1, "b--" } 18 | )) 19 | } 20 | // ANCHOR_END: component 21 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/hooks_use_ref.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: component 5 | pub fn App(cx: Scope) -> Element { 6 | let list = use_ref(cx, Vec::new); 7 | 8 | cx.render(rsx!( 9 | p { "Current list: {list.read():?}" } 10 | button { 11 | onclick: move |event| { 12 | list.with_mut(|list| list.push(event)); 13 | }, 14 | "Click me!" 15 | } 16 | )) 17 | } 18 | // ANCHOR_END: component 19 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/input_controlled.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: component 5 | pub fn App(cx: Scope) -> Element { 6 | let name = use_state(cx, || "bob".to_string()); 7 | 8 | cx.render(rsx! { 9 | input { 10 | // we tell the component what to render 11 | value: "{name}", 12 | // and what to do when the value changes 13 | oninput: move |evt| name.set(evt.value.clone()), 14 | } 15 | }) 16 | } 17 | // ANCHOR_END: component 18 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/input_uncontrolled.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: component 5 | pub fn App(cx: Scope) -> Element { 6 | cx.render(rsx! { 7 | form { 8 | onsubmit: move |event| { 9 | log::info!("Submitted! {event:?}") 10 | }, 11 | input { name: "name", }, 12 | input { name: "age", }, 13 | input { name: "date", }, 14 | input { r#type: "submit", }, 15 | } 16 | }) 17 | } 18 | // ANCHOR_END: component 19 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/readme.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | pub fn App(cx: Scope) -> Element { 4 | let mut count = use_state(cx, || 0); 5 | 6 | cx.render(rsx! { 7 | h1 { "High-Five counter: {count}" } 8 | button { onclick: move |_| count += 1, "Up high!" } 9 | button { onclick: move |_| count -= 1, "Down low!" } 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/server_basic.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | use dioxus::prelude::*; 3 | use dioxus_fullstack::prelude::*; 4 | 5 | fn main() { 6 | LaunchBuilder::new(app).launch(); 7 | } 8 | 9 | fn app(cx: Scope) -> Element { 10 | let mut count = use_state(cx, || 0); 11 | 12 | cx.render(rsx! { 13 | h1 { "High-Five counter: {count}" } 14 | button { onclick: move |_| count += 1, "Up high!" } 15 | button { onclick: move |_| count -= 1, "Down low!" } 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/server_data_fetch.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | 3 | use dioxus::prelude::*; 4 | use dioxus_fullstack::prelude::*; 5 | 6 | fn main() { 7 | LaunchBuilder::new(app).launch(); 8 | } 9 | 10 | fn app(cx: Scope) -> Element { 11 | let mut count = use_future(cx, (), |_| async { get_server_data().await }); 12 | 13 | cx.render(rsx! { 14 | "server data is {count.value():?}" 15 | }) 16 | } 17 | 18 | #[server] 19 | async fn get_server_data() -> Result { 20 | // Access a database 21 | tokio::time::sleep(std::time::Duration::from_millis(100)).await; 22 | Ok("Hello from the server!".to_string()) 23 | } 24 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/server_data_prefetch.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | 3 | use dioxus::prelude::*; 4 | use dioxus_fullstack::prelude::*; 5 | 6 | fn main() { 7 | LaunchBuilder::new(app).launch(); 8 | } 9 | 10 | fn app(cx: Scope) -> Element { 11 | let mut count = use_server_future(cx, (), |_| async { get_server_data().await })?; 12 | 13 | cx.render(rsx! { 14 | "server data is {count.value():?}" 15 | }) 16 | } 17 | 18 | #[server] 19 | async fn get_server_data() -> Result { 20 | // Access a database 21 | tokio::time::sleep(std::time::Duration::from_millis(100)).await; 22 | Ok("Hello from the server!".to_string()) 23 | } 24 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/server_function_extract.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | use dioxus_fullstack::prelude::*; 3 | 4 | // ANCHOR: server_function_extract 5 | #[server] 6 | pub async fn log_user_agent() -> Result<(), ServerFnError> { 7 | let axum::TypedHeader(user_agent): axum::TypedHeader = 8 | extract().await?; 9 | log::info!("{:?}", user_agent); 10 | Ok(()) 11 | } 12 | // ANCHOR_END: server_function_extract 13 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/server_function_middleware.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | use dioxus_fullstack::prelude::*; 3 | 4 | // ANCHOR: server_function_middleware 5 | #[server] 6 | // Add a timeout middleware to the server function that will return an error if the function takes longer than 1 second to execute 7 | #[middleware(tower_http::timeout::TimeoutLayer::new(std::time::Duration::from_secs(1)))] 8 | pub async fn timeout() -> Result<(), ServerFnError> { 9 | tokio::time::sleep(std::time::Duration::from_secs(2)).await; 10 | Ok(()) 11 | } 12 | // ANCHOR_END: server_function_middleware 13 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_04/static_segments.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | use dioxus_router::prelude::*; 4 | 5 | // ANCHOR: route 6 | #[derive(Routable, Clone)] 7 | #[rustfmt::skip] 8 | enum Route { 9 | // Routes always start with a slash 10 | #[route("/")] 11 | Home {}, 12 | // You can have multiple segments in a route 13 | #[route("/hello/world")] 14 | HelloWorld {}, 15 | } 16 | 17 | #[component] 18 | fn Home(cx: Scope) -> Element { 19 | todo!() 20 | } 21 | 22 | #[component] 23 | fn HelloWorld(cx: Scope) -> Element { 24 | todo!() 25 | } 26 | // ANCHOR_END: route 27 | 28 | fn main() {} 29 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_05/custom_assets.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | fn main() { 4 | launch(app); 5 | } 6 | 7 | fn app() -> Element { 8 | rsx! { 9 | div { 10 | img { src: "/public/static/scanner.png" } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_05/event_click.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | pub fn App() -> Element { 5 | // ANCHOR: rsx 6 | rsx! { 7 | button { onclick: move |event| log::info!("Clicked! Event: {event:?}"), "click me!" } 8 | } 9 | // ANCHOR_END: rsx 10 | } 11 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_05/event_nested.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | fn main() { 5 | launch(App); 6 | } 7 | 8 | fn App() -> Element { 9 | // ANCHOR: rsx 10 | rsx! { 11 | div { onclick: move |_event| {}, 12 | "outer" 13 | button { 14 | onclick: move |event| { 15 | event.stop_propagation(); 16 | }, 17 | "inner" 18 | } 19 | } 20 | } 21 | // ANCHOR_END: rsx 22 | } 23 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_05/event_prevent_default.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | 4 | pub fn App() -> Element { 5 | // ANCHOR: prevent_default 6 | rsx! { 7 | a { 8 | href: "https://example.com", 9 | prevent_default: "onclick", 10 | "example.com" 11 | } 12 | } 13 | // ANCHOR_END: prevent_default 14 | } 15 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_05/history_provider.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | use dioxus::prelude::*; 3 | use dioxus_router::prelude::*; 4 | 5 | #[derive(Routable, Clone)] 6 | enum Route { 7 | #[route("/")] 8 | Home {}, 9 | } 10 | 11 | // ANCHOR: app 12 | #[component] 13 | fn App() -> Element { 14 | rsx! {Router:: { config: || RouterConfig::default().history(WebHistory::default()) }} 15 | } 16 | // ANCHOR_END: app 17 | 18 | #[component] 19 | fn Home() -> Element { 20 | rsx! { h1 { "Welcome to the Dioxus Blog!" } } 21 | } 22 | 23 | fn main() {} 24 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_05/router_cfg.rs: -------------------------------------------------------------------------------- 1 | // ANCHOR: router 2 | #![allow(non_snake_case)] 3 | use dioxus::prelude::*; 4 | use dioxus_router::prelude::*; 5 | 6 | /// An enum of all of the possible routes in the app. 7 | #[derive(Routable, Clone)] 8 | enum Route { 9 | // The home page is at the / route 10 | #[route("/")] 11 | Home {}, 12 | } 13 | // ANCHOR_END: router 14 | 15 | // ANCHOR: app 16 | #[component] 17 | fn App() -> Element { 18 | rsx! {Router:: { config: || RouterConfig::default().history(WebHistory::default()) }} 19 | } 20 | // ANCHOR_END: app 21 | 22 | // ANCHOR: home 23 | #[component] 24 | fn Home() -> Element { 25 | rsx! { h1 { "Welcome to the Dioxus Blog!" } } 26 | } 27 | // ANCHOR_END: home 28 | 29 | fn main() {} 30 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_05/server_function_extract.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: server_function_extract 5 | #[server] 6 | pub async fn log_headers() -> Result<(), ServerFnError> { 7 | let headers: http::HeaderMap = extract().await?; 8 | log::info!("{:?}", headers[http::header::USER_AGENT]); 9 | Ok(()) 10 | } 11 | // ANCHOR_END: server_function_extract 12 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_05/server_function_middleware.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case, unused)] 2 | use dioxus::prelude::*; 3 | 4 | // ANCHOR: server_function_middleware 5 | #[server] 6 | // Add a timeout middleware to the server function that will return an error if the function takes longer than 1 second to execute 7 | #[middleware(tower_http::timeout::TimeoutLayer::new(std::time::Duration::from_secs(1)))] 8 | pub async fn timeout() -> Result<(), ServerFnError> { 9 | tokio::time::sleep(std::time::Duration::from_secs(2)).await; 10 | Ok(()) 11 | } 12 | // ANCHOR_END: server_function_middleware 13 | -------------------------------------------------------------------------------- /packages/docs-router/src/doc_examples/untested_05/tailwind.rs: -------------------------------------------------------------------------------- 1 | // Urls are relative to your Cargo.toml file 2 | const _TAILWIND_URL: &str = manganis::mg!(file("public/tailwind.css")); 3 | -------------------------------------------------------------------------------- /packages/docs-router/src/docs/.gitignore: -------------------------------------------------------------------------------- 1 | *.rs 2 | -------------------------------------------------------------------------------- /packages/docs-router/src/docs/readme.md: -------------------------------------------------------------------------------- 1 | we need to ignore the router.rs file because it's autogenerated 2 | -------------------------------------------------------------------------------- /packages/docs-router/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod desktop_dependencies; 2 | pub mod doc_examples; 3 | pub mod docs; 4 | -------------------------------------------------------------------------------- /packages/docsite/assets/CNAME: -------------------------------------------------------------------------------- 1 | dioxuslabs.com -------------------------------------------------------------------------------- /packages/docsite/assets/gtag.js: -------------------------------------------------------------------------------- 1 | window.dataLayer = window.dataLayer || []; 2 | function gtag() { 3 | dataLayer.push(arguments); 4 | } 5 | gtag("js", new Date()); 6 | gtag("config", "G-EBE72MVZ1B"); 7 | -------------------------------------------------------------------------------- /packages/docsite/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/icon.png -------------------------------------------------------------------------------- /packages/docsite/assets/material.css: -------------------------------------------------------------------------------- 1 | /* fallback */ 2 | @font-face { 3 | font-family: 'Material Icons'; 4 | font-style: normal; 5 | font-weight: 400; 6 | src: url(https://fonts.gstatic.com/s/materialicons/v142/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2) format('woff2'); 7 | } 8 | 9 | .material-icons { 10 | font-family: 'Material Icons'; 11 | font-weight: normal; 12 | font-style: normal; 13 | font-size: 24px; 14 | line-height: 1; 15 | letter-spacing: normal; 16 | text-transform: none; 17 | display: inline-block; 18 | white-space: nowrap; 19 | word-wrap: normal; 20 | direction: ltr; 21 | text-rendering: optimizeLegibility; 22 | -webkit-font-smoothing: antialiased; 23 | } 24 | -------------------------------------------------------------------------------- /packages/docsite/assets/static/android_ndk_installation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/android_ndk_installation.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/bumpframe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/bumpframe.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/bundle_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/bundle_app.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/dioxus-new.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/dioxus-new.mp4 -------------------------------------------------------------------------------- /packages/docsite/assets/static/docsite_cropped.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/docsite_cropped.avif -------------------------------------------------------------------------------- /packages/docsite/assets/static/docsite_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/docsite_cropped.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/favicon.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/ferrous_wave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/ferrous_wave.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/file_explorer.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/file_explorer.avif -------------------------------------------------------------------------------- /packages/docsite/assets/static/file_explorer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/file_explorer.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/futurewei_bw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/futurewei_bw.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/images03/compiletimecorrect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/images03/compiletimecorrect.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/images03/component_borrowed_props_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/images03/component_borrowed_props_screenshot.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/images03/component_owned_props_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/images03/component_owned_props_screenshot.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/images03/component_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/images03/component_tree.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/images03/counter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/images03/counter.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/images03/counter_two_state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/images03/counter_two_state.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/images03/diffing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/images03/diffing.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/images03/dioxuslogo_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/images03/dioxuslogo_full.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/images03/meme_editor_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/images03/meme_editor_screenshot.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/images03/oldnew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/images03/oldnew.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/images03/publish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/images03/publish.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/images03/screenshot_about_component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/images03/screenshot_about_component.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/jsbenchmark_cropped.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/jsbenchmark_cropped.avif -------------------------------------------------------------------------------- /packages/docsite/assets/static/jsbenchmark_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/jsbenchmark_cropped.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/marketplace_cropped.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/marketplace_cropped.avif -------------------------------------------------------------------------------- /packages/docsite/assets/static/marketplace_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/marketplace_cropped.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/opengraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/opengraph.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/rustacean-flat-gesture.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/rustacean-flat-gesture.avif -------------------------------------------------------------------------------- /packages/docsite/assets/static/satellite.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/satellite.webp -------------------------------------------------------------------------------- /packages/docsite/assets/static/scanner.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/scanner.avif -------------------------------------------------------------------------------- /packages/docsite/assets/static/scanner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/scanner.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/smalllogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/smalllogo.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/todos_cropped.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/todos_cropped.avif -------------------------------------------------------------------------------- /packages/docsite/assets/static/todos_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/todos_cropped.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/x_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/docsite/assets/static/x_logo.png -------------------------------------------------------------------------------- /packages/docsite/assets/static/x_logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/docsite/assets/static/xailogo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/docsite/assets/tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | purge: { 3 | mode: "all", 4 | content: [ 5 | "../src/**/*.rs", 6 | "../index.html", 7 | "../src/**/*.html", 8 | "../src/**/*.css", 9 | ], 10 | }, 11 | darkMode: 'class', // <= 'media' or 'class' 12 | theme: {}, 13 | variants: {}, 14 | plugins: [], 15 | }; 16 | -------------------------------------------------------------------------------- /packages/docsite/src/components.rs: -------------------------------------------------------------------------------- 1 | pub mod awesome; 2 | pub use awesome::*; 3 | pub mod blog; 4 | pub use blog::*; 5 | pub mod deploy; 6 | pub use deploy::*; 7 | pub mod footer; 8 | pub use footer::*; 9 | pub mod homepage; 10 | pub use homepage::*; 11 | pub mod learn; 12 | pub use learn::*; 13 | pub mod nav; 14 | pub use nav::*; 15 | pub mod notfound; 16 | pub use notfound::*; 17 | pub mod playground; 18 | pub use playground::*; 19 | pub mod search; 20 | pub use search::*; 21 | pub mod llms; 22 | -------------------------------------------------------------------------------- /packages/docsite/src/components/storage.js: -------------------------------------------------------------------------------- 1 | // Handle caching of github stars 2 | 3 | // Two days 4 | const STAR_EXPIRE_TIME = 172800000; 5 | 6 | export function get_stars(name) { 7 | let item = localStorage.getItem(name); 8 | let data = JSON.parse(item); 9 | 10 | if (!data) { 11 | return null; 12 | } 13 | 14 | if (data.expires <= Date.now()) { 15 | localStorage.removeItem(name); 16 | return null; 17 | } 18 | 19 | return data.stars; 20 | } 21 | 22 | export function set_stars(name, value) { 23 | let expires = Date.now() + STAR_EXPIRE_TIME; 24 | let data = { stars: value, expires }; 25 | 26 | let converted = JSON.stringify(data); 27 | localStorage.setItem(name, converted); 28 | } -------------------------------------------------------------------------------- /packages/docsite/src/snippets/async_.rs: -------------------------------------------------------------------------------- 1 | //! Easily integrate async Rust code into your components. 2 | use dioxus::prelude::*; 3 | 4 | fn Tasks() -> Element { 5 | let mut count = use_signal(|| 0); 6 | 7 | use_future(move || async move { 8 | loop { 9 | count += 1; 10 | tokio::time::sleep(std::time::Duration::from_millis(500)).await; 11 | } 12 | }); 13 | 14 | rsx! { pre { "Count: {count}" } } 15 | } 16 | -------------------------------------------------------------------------------- /packages/docsite/src/snippets/components.rs: -------------------------------------------------------------------------------- 1 | //! Encapsulate state in components 2 | use dioxus::prelude::*; 3 | 4 | #[component] 5 | fn Stateful(name: String, age: u64) -> Element { 6 | rsx! {"Hello {name}, you are {age} years old!"} 7 | } 8 | 9 | fn App() -> Element { 10 | rsx! { Stateful { name: "Alice", age: 30 } } 11 | } 12 | -------------------------------------------------------------------------------- /packages/docsite/src/snippets/global.rs: -------------------------------------------------------------------------------- 1 | //! Use Signal::global to easily manage global state with a simple Atom-based API 2 | use dioxus::prelude::*; 3 | 4 | // Define an atom of state 5 | static COUNT: GlobalSignal = Signal::global(|| 0); 6 | 7 | // Read it anywhere 8 | fn Read() -> Element { 9 | rsx! {"Count: {COUNT}"} 10 | } 11 | 12 | // Or write to it from anywhere 13 | fn Increment() -> Element { 14 | rsx! { button { onclick: move |_| *COUNT.write() += 1, "Increment" } } 15 | } 16 | 17 | fn App() -> Element { 18 | rsx! { 19 | Read {} 20 | Increment {} 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/docsite/src/snippets/mod.rs: -------------------------------------------------------------------------------- 1 | // Check any examples we don't compile into the docs 2 | #[cfg(feature = "doc_test")] 3 | automod::dir!(pub "src/snippets"); 4 | -------------------------------------------------------------------------------- /packages/docsite/src/snippets/readme.rs: -------------------------------------------------------------------------------- 1 | //! Simple, familiar, React-like syntax 2 | use dioxus::prelude::*; 3 | 4 | fn app() -> Element { 5 | let mut count = use_signal(|| 0); 6 | 7 | rsx! { 8 | h1 { "High-Five counter: {count}" } 9 | button { onclick: move |_| count += 1, "Up high!" } 10 | button { onclick: move |_| count -= 1, "Down low!" } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/docsite/src/snippets/server.rs: -------------------------------------------------------------------------------- 1 | //! Server functions let you write server-side code that can be called from the client as a normal async function. 2 | use dioxus::prelude::*; 3 | 4 | #[component] 5 | fn Server() -> Element { 6 | let future = use_server_future(get_server_data)?; 7 | 8 | match future() { 9 | Some(Ok(data)) => rsx! { pre { "The server says: {data}" } }, 10 | Some(Err(e)) => rsx! {"An error occurred: {e:?}"}, 11 | None => rsx! {"Loading..."}, 12 | } 13 | } 14 | 15 | #[server] 16 | async fn get_server_data() -> Result { 17 | Ok("Hello from the server!".to_string()) 18 | } 19 | -------------------------------------------------------------------------------- /packages/include_mdbook/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: DioxusLabs # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | open_collective: dioxus-labs # Replace with a single Open Collective username 5 | -------------------------------------------------------------------------------- /packages/include_mdbook/.github/ISSUE_TEMPLATE/feature_requst.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: If you have any interesting advice, you can tell us. 4 | --- 5 | 6 | ## Specific Demand 7 | 8 | 11 | 12 | ## Implement Suggestion 13 | 14 | -------------------------------------------------------------------------------- /packages/include_mdbook/.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Maintain dependencies for GitHub Actions 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "weekly" 8 | -------------------------------------------------------------------------------- /packages/include_mdbook/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /Cargo.lock 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-gen-example/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mdbook-gen-example" 3 | version = "0.0.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | serde = {version = "1.0.163", features = ["derive"]} 8 | use-mdbook = { workspace = true } 9 | dioxus = { version = "0.6.2", features = ["router"] } 10 | 11 | [build-dependencies] 12 | mdbook-gen = { path = "../mdbook-gen", features = ["manganis"] } 13 | mdbook-shared = { path = "../mdbook-shared" } 14 | dioxus-autofmt = { version = "0.6.0" } 15 | prettyplease = "0.2.20" 16 | syn = { workspace = true } 17 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-gen-example/build.rs: -------------------------------------------------------------------------------- 1 | use std::{env::current_dir, path::PathBuf}; 2 | 3 | fn main() { 4 | // re-run only if the "example-book" directory changes 5 | println!("cargo:rerun-if-changed=example-book"); 6 | 7 | let manifest_dir = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()); 8 | let mdbook_dir = manifest_dir.join("./example-book").canonicalize().unwrap(); 9 | let out_dir = current_dir().unwrap().join("src"); 10 | 11 | let mut out = mdbook_gen::generate_router_build_script(mdbook_dir); 12 | out.push_str("\n"); 13 | out.push_str("use super::*;\n"); 14 | 15 | std::fs::write(out_dir.join("router.rs"), out).unwrap(); 16 | } 17 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-gen-example/example-book/.gitignore: -------------------------------------------------------------------------------- 1 | book 2 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-gen-example/example-book/SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | - [Chapter 1](./chapter_1.md) 4 | - [Chapter 2](./chapter_2.md) 5 | - [Chapter 3](./chapter_3.md) 6 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-gen-example/example-book/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/include_mdbook/packages/mdbook-gen-example/example-book/assets/logo.png -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-gen-example/example-book/assets/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/include_mdbook/packages/mdbook-gen-example/example-book/assets/logo1.png -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-gen-example/example-book/assets/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/include_mdbook/packages/mdbook-gen-example/example-book/assets/logo2.png -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-gen-example/example-book/assets/some.css: -------------------------------------------------------------------------------- 1 | .demo { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-gen-example/example-book/book.toml: -------------------------------------------------------------------------------- 1 | [book] 2 | authors = ["Jonathan Kelley"] 3 | language = "en" 4 | src = "en" 5 | title = "example-book" 6 | 7 | [language.en] 8 | name = "English" 9 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-gen-example/example-book/en/chapter_3.md: -------------------------------------------------------------------------------- 1 | # Assets 2 | 3 | Some assets: 4 | ![some_external](https://avatars.githubusercontent.com/u/79236386?s=200&v=4) 5 | ![some_local](/example-book/assets/logo.png) 6 | ![some_local1](/example-book/assets/logo1.png) 7 | ![some_local2](/example-book/assets/logo2.png) 8 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-gen-example/src/included_example.rs: -------------------------------------------------------------------------------- 1 | fn it_works() {} 2 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-gen-example/src/lib.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | mod router; 4 | 5 | #[component] 6 | pub fn CodeBlock(contents: String, name: Option) -> Element { 7 | todo!() 8 | } 9 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-gen/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mdbook-gen" 3 | version = "0.0.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | proc-macro2 = { version = "1.0" } 8 | quote = "1.0" 9 | syn = { workspace = true } 10 | mdbook-shared = { path = "../mdbook-shared" } 11 | anyhow = "1.0.71" 12 | serde = { version = "1.0.163", features = ["derive"] } 13 | serde_json = "1.0.96" 14 | macro_state = "0.2.0" 15 | convert_case = "0.6.0" 16 | postcard = { version = "1.0.4", features = ["use-std"] } 17 | pulldown-cmark = "0.13.0" 18 | pulldown-cmark-to-cmark = "21.0.0" 19 | syntect = { version = "5.2.0", features = ["plist-load"] } 20 | dioxus-rsx = { version = "0.6.0" } 21 | dioxus-autofmt = { version = "0.6.0" } 22 | prettyplease = "0.2.20" 23 | once_cell = "1.20.2" 24 | 25 | [dev-dependencies] 26 | pretty_assertions = "1.3.0" 27 | 28 | [features] 29 | default = ["manganis"] 30 | manganis = [] 31 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-macro/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /Cargo.lock 3 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-macro/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mdbook-macro" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [lib] 9 | proc-macro = true 10 | 11 | [dependencies] 12 | proc-macro2 = { version = "1.0" } 13 | quote = "1.0" 14 | syn = { workspace = true } 15 | mdbook-shared = { path = "../mdbook-shared" } 16 | anyhow = "1.0.71" 17 | serde = { version = "1.0.163", features = ["derive"] } 18 | serde_json = "1.0.96" 19 | macro_state = "0.2.0" 20 | convert_case = "0.6.0" 21 | postcard = { version = "1.0.4", features = ["use-std"] } 22 | pulldown-cmark = "0.9.3" 23 | syntect = "5.0" 24 | dioxus-rsx = { version = "0.6.0" } 25 | mdbook-gen = { workspace = true } 26 | 27 | [features] 28 | manganis = [] 29 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-macro/README.md: -------------------------------------------------------------------------------- 1 | # mdbook-macro 2 | 3 | Compiles mdbooks with proc-macros and exposes their internals with TYPE SAFETY. 4 | 5 | Whaaaaaaaat??? 6 | 7 | Crazy. 8 | 9 | ```rust 10 | mdbook_router! {"../example-book"} 11 | ``` 12 | 13 | Integrates with the dioxus-router to create a router from a mdbook. 14 | 15 | 16 | ## Todo: 17 | 18 | - Incrementally recompile the mdbook as its contents change 19 | - Integrate with the `hot-reload` crate to allow live-editable dioxus websites that include mdbooks. 20 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-macro/src/lib.rs: -------------------------------------------------------------------------------- 1 | use proc_macro::TokenStream; 2 | use quote::quote; 3 | use quote::ToTokens; 4 | use syn::LitStr; 5 | 6 | use mdbook_gen::*; 7 | 8 | #[proc_macro] 9 | pub fn mdbook_router(input: TokenStream) -> TokenStream { 10 | match syn::parse::(input).map(load_book_from_fs) { 11 | Ok(Ok((path, book))) => generate_router(path, book).into(), 12 | Ok(Err(err)) => write_book_err(err), 13 | Err(err) => err.to_compile_error().into(), 14 | } 15 | } 16 | 17 | fn write_book_err(err: anyhow::Error) -> TokenStream { 18 | let err = err.to_string(); 19 | println!("{}", err); 20 | quote! { compile_error!(#err); }.to_token_stream().into() 21 | } 22 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-shared/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /Cargo.lock 3 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-shared/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mdbook-shared" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | anyhow = "1.0.71" 10 | log = "0.4.18" 11 | memchr = "2.5.0" 12 | pulldown-cmark = "0.9.3" 13 | serde = { version = "1.0.163", features = ["derive"] } 14 | serde_json = "1.0.96" 15 | toml = "0.7.4" 16 | bytes = { version = "1.3.0", features = ["serde"] } 17 | slab = "0.4.8" 18 | 19 | [target.'cfg(arch = "wasm32")'.dependencies] 20 | getrandom = { workspace = true, features = ["js"] } 21 | 22 | [features] 23 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-shared/src/errors.rs: -------------------------------------------------------------------------------- 1 | pub(crate) use anyhow::bail; 2 | pub use anyhow::{Error, Result}; 3 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/mdbook-shared/src/lib.rs: -------------------------------------------------------------------------------- 1 | mod summary; 2 | pub use summary::*; 3 | 4 | pub mod query; 5 | pub use query::*; 6 | 7 | pub mod errors; 8 | pub use errors::*; 9 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/syntect-html/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /Cargo.lock 3 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/syntect-html/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "syntect-html" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [lib] 9 | proc-macro = true 10 | 11 | [dependencies] 12 | proc-macro2 = { version = "1.0" } 13 | quote = "1.0" 14 | syn = { workspace = true } 15 | syntect = "5.0" 16 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/syntect-html/README.md: -------------------------------------------------------------------------------- 1 | # mdbook-macro 2 | 3 | Compiles mdbooks with proc-macros and exposes their internals with TYPE SAFETY. 4 | 5 | Whaaaaaaaat??? 6 | 7 | Crazy. 8 | 9 | ```rust 10 | static DOCS: MdBook = include_mdbook!("docs"); 11 | 12 | dbg!(DOCS.summary); 13 | ``` 14 | 15 | Will incrementally recompile the mdbook as its contents change. 16 | 17 | Integrates with the `use_mdbook` crate to allow live-editable dioxus websites that include mdbooks. 18 | 19 | 20 | ## Todo: 21 | 22 | - use static defs instead of serde on the boundary 23 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/use-mdbook/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /Cargo.lock 3 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/use-mdbook/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "use-mdbook" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | lazy_static = "1.4.0" 10 | mdbook-macro = { path = "../mdbook-macro" } 11 | mdbook-shared = { path = "../mdbook-shared" } 12 | once_cell = "1.17.2" 13 | postcard = { version = "1.0.4", features = ["use-std"] } 14 | serde = { version = "1.0.163", features = ["derive"] } 15 | serde_json = "1.0.96" 16 | yazi = { workspace = true } 17 | 18 | [dev-dependencies] 19 | dioxus = { version = "0.6.0" } 20 | dioxus-router = { version = "0.6.0" } 21 | tokio = { version = "*", features = ["full"] } 22 | 23 | [features] 24 | default = ["manganis"] 25 | manganis = ["mdbook-macro/manganis"] 26 | -------------------------------------------------------------------------------- /packages/include_mdbook/packages/use-mdbook/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub use mdbook_shared; 2 | 3 | pub use mdbook_macro::*; 4 | pub use once_cell::sync::Lazy; 5 | pub use yazi; 6 | -------------------------------------------------------------------------------- /packages/playground/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [profile] 2 | 3 | [profile.dioxus-wasm] 4 | inherits = "dev" 5 | opt-level = 2 6 | 7 | [profile.dioxus-server] 8 | inherits = "dev" 9 | opt-level = 2 10 | 11 | [profile.dioxus-android] 12 | inherits = "dev" 13 | opt-level = 2 14 | -------------------------------------------------------------------------------- /packages/playground/.dockerignore: -------------------------------------------------------------------------------- 1 | **/target 2 | **/dist 3 | LICENSES 4 | LICENSE 5 | temp 6 | README.md 7 | 8 | dx-debian -------------------------------------------------------------------------------- /packages/playground/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | /dist/ 5 | /static/ 6 | /.dioxus/ 7 | /temp/ 8 | dx-debian 9 | # These are backup files generated by rustfmt 10 | **/*.rs.bk 11 | -------------------------------------------------------------------------------- /packages/playground/LICENSES/README.md: -------------------------------------------------------------------------------- 1 | This folder contains all licenses for 3rd party assets and software used in `dioxus-playground`. 2 | 3 | - [Monaco Editor MIT](./MONACO-MIT) 4 | - [Material Icons Apache 2.0](./MATERIAL-ICONS-APACHE2) 5 | - [SVG-SPINNERS](./SVG-SPINNERS-MIT) -------------------------------------------------------------------------------- /packages/playground/example-projects/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "example-projects" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | include_dir = "0.7.3" 8 | once_cell = "1.17.1" 9 | anyhow = "1.0.95" 10 | 11 | model = { workspace = true } 12 | 13 | [dev-dependencies] 14 | dioxus = { workspace = true, features = ["web"] } 15 | -------------------------------------------------------------------------------- /packages/playground/example-projects/README.md: -------------------------------------------------------------------------------- 1 | The home for all the snippets. 2 | 3 | The index is saved here to be imported by both the client and the server, giving the client the ability to select the example to run. 4 | 5 | -------------------------------------------------------------------------------- /packages/playground/example-projects/assets/main.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/playground/example-projects/assets/main.css -------------------------------------------------------------------------------- /packages/playground/example-projects/examples/counter.rs: -------------------------------------------------------------------------------- 1 | //! A basic counter example demonstrating signals, 2 | //! event handlers, and basic rendering. 3 | 4 | use dioxus::prelude::*; 5 | 6 | fn main() { 7 | dioxus::launch(App); 8 | } 9 | 10 | #[component] 11 | fn App() -> Element { 12 | let mut count = use_signal(|| 0); 13 | 14 | rsx! { 15 | p { "Count: {count}" } 16 | div { style: "display: flex;", 17 | button { onclick: move |_| count -= 1, "-" } 18 | button { onclick: move |_| count += 1, "+" } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/playground/example-projects/examples/welcome.rs: -------------------------------------------------------------------------------- 1 | //! The simplest Dioxus app 2 | 3 | use dioxus::prelude::*; 4 | 5 | fn main() { 6 | dioxus::launch(App); 7 | } 8 | 9 | #[component] 10 | fn App() -> Element { 11 | rsx! { 12 | div { "Build cool stuff!" } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/playground/model/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "model" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | serde_json = { workspace = true } 8 | uuid = { workspace = true, features = ["serde", "v3"] } 9 | serde = { workspace = true } 10 | thiserror = { workspace = true } 11 | reqwest = { workspace = true, features = ["json"] } 12 | dioxus-logger = { workspace = true } 13 | 14 | # Server only 15 | dioxus-dx-wire-format = { workspace = true, optional = true } 16 | axum = { workspace = true, features = ["ws"], optional = true } 17 | 18 | # Web only 19 | gloo-net = { workspace = true, optional = true } 20 | gloo-utils = { workspace = true, optional = true } 21 | dioxus-document = { workspace = true, optional = true } 22 | 23 | [features] 24 | server = ["dep:dioxus-dx-wire-format", "dep:axum"] 25 | web = ["dep:gloo-net", "dep:gloo-utils", "dep:dioxus-document"] 26 | -------------------------------------------------------------------------------- /packages/playground/playground/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "rust-analyzer.cargo.target": "wasm32-unknown-unknown", 3 | } -------------------------------------------------------------------------------- /packages/playground/playground/assets/monaco-editor-0.52.2/vs/base/browser/ui/codicons/codicon/codicon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/playground/playground/assets/monaco-editor-0.52.2/vs/base/browser/ui/codicons/codicon/codicon.ttf -------------------------------------------------------------------------------- /packages/playground/playground/src/components/mod.rs: -------------------------------------------------------------------------------- 1 | mod header; 2 | pub use header::*; 3 | 4 | mod panes; 5 | pub use panes::*; 6 | 7 | mod modal; 8 | pub use modal::*; 9 | 10 | pub mod icons; 11 | 12 | mod logs; 13 | pub use logs::*; 14 | -------------------------------------------------------------------------------- /packages/playground/playground/src/editor/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod monaco; 2 | 3 | const EDITOR_ELEMENT_ID: &str = "dxp-panes-left"; 4 | -------------------------------------------------------------------------------- /packages/playground/playground/src/share_code.rs: -------------------------------------------------------------------------------- 1 | use dioxus::signals::{Signal, Writable}; 2 | use dioxus_document::eval; 3 | use model::{api::ApiClient, AppError, Project}; 4 | 5 | /// Share a project and copy the link to the clipboard. 6 | pub async fn copy_share_link( 7 | api_client: &ApiClient, 8 | mut project: Signal, 9 | location: &str, 10 | ) -> Result<(), AppError> { 11 | let share_code = project.write().share_project(api_client).await?; 12 | 13 | let formatted = format!("{}/shared/{}", location, share_code); 14 | let e = eval( 15 | r#" 16 | const data = await dioxus.recv(); 17 | navigator.clipboard.writeText(data); 18 | "#, 19 | ); 20 | 21 | e.send(formatted)?; 22 | 23 | Ok(()) 24 | } 25 | -------------------------------------------------------------------------------- /packages/playground/runner/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "runner" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | dioxus-playground = { workspace = true } 8 | example-projects = { workspace = true } 9 | 10 | dioxus = { workspace = true, features = ["web", "router"] } 11 | dioxus-document = { workspace = true } 12 | 13 | [features] 14 | real-server = [] # Run the playground with the real server. 15 | -------------------------------------------------------------------------------- /packages/playground/runner/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/playground/runner/src/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 20px 0px; 4 | height: 100%; 5 | width: 100%; 6 | background-color: #ffffff; 7 | } 8 | 9 | @media (prefers-color-scheme: dark) { 10 | body { 11 | background-color: #0e1116; 12 | } 13 | } 14 | 15 | .playground-container { 16 | height: 800px; 17 | display: flex; 18 | flex-direction: column; 19 | } 20 | -------------------------------------------------------------------------------- /packages/playground/server/.gitignore: -------------------------------------------------------------------------------- 1 | temp/ 2 | -------------------------------------------------------------------------------- /packages/playground/server/template/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | Cargo.lock 3 | /dist 4 | /Cargo.toml 5 | /Dioxus.toml 6 | /src/main.rs 7 | .cargo -------------------------------------------------------------------------------- /packages/playground/server/template/snippets/Cargo.toml: -------------------------------------------------------------------------------- 1 | # This excludes the template from the rest of the workspaces. 2 | [workspace] 3 | 4 | [package] 5 | name = "play-{BUILD_ID}" 6 | version = "0.1.0" 7 | edition = "2021" 8 | 9 | [dependencies] 10 | dioxus = { version= "0.6", features = ["web", "router"] } 11 | 12 | [profile.dev] 13 | opt-level = 1 14 | debug-assertions = true 15 | strip = true 16 | debug = false 17 | incremental = true 18 | 19 | [profile.wasm-dev] 20 | inherits = "dev" 21 | opt-level = 1 22 | -------------------------------------------------------------------------------- /packages/playground/server/template/snippets/Dioxus.toml: -------------------------------------------------------------------------------- 1 | [application] 2 | name = "{BUILD_ID}" 3 | default_platform = "web" 4 | out_dir = "dist" 5 | asset_dir = "public" 6 | hot_reload = false 7 | 8 | [web.app] 9 | base_path = "built/{BUILD_ID}" 10 | 11 | title = "Dioxus Playground" 12 | [web.watcher] 13 | index_on_404 = true 14 | watch_path = ["src", "examples"] 15 | [web.resource] 16 | style = [] 17 | script = [] 18 | [web.resource.dev] 19 | script = [] 20 | [application.plugins] 21 | available = true 22 | required = [] 23 | 24 | -------------------------------------------------------------------------------- /packages/playground/server/template/src/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DioxusLabs/docsite/ab5e121b9a9e022cecdfd35f55af3cac993fb5fb/packages/playground/server/template/src/.gitkeep -------------------------------------------------------------------------------- /packages/search/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /Cargo.lock 3 | -------------------------------------------------------------------------------- /packages/search/search-macro/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /Cargo.lock 3 | -------------------------------------------------------------------------------- /packages/search/search-macro/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "dioxus-search-macro" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [lib] 9 | proc-macro = true 10 | 11 | [dependencies] 12 | quote = "1.0" 13 | syn = { workspace = true } 14 | -------------------------------------------------------------------------------- /packages/search/search-shared/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /Cargo.lock 3 | -------------------------------------------------------------------------------- /packages/search/search-shared/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "dioxus-search-shared" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | serde = { version = "1.0.163", features = ["derive"] } 10 | serde_json = "1.0.96" 11 | toml = "0.8.19" 12 | stork-lib = { workspace = true, features = ["build-v3"], default-features = false } 13 | bytes = { version = "1.3.0", features = ["serde"] } 14 | slab = "0.4.8" 15 | dioxus-router = { version = "0.6.0" } 16 | yazi = { workspace = true } 17 | scraper = "0.22.0" 18 | log = "0.4.19" 19 | 20 | [target.'cfg(target_family = "wasm")'.dependencies] 21 | getrandom = { workspace = true, features = ["js"] } 22 | -------------------------------------------------------------------------------- /packages/search/search/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "dioxus-search" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | serde = { version = "1.0.163", features = ["derive"] } 10 | serde_json = "1.0.96" 11 | toml = "0.7.4" 12 | stork-lib = { workspace = true, features = ["build-v3"], default-features = false } 13 | bytes = { version = "1.3.0", features = ["serde"] } 14 | slab = "0.4.8" 15 | dioxus-router = { version = "0.6.0" } 16 | yazi = { workspace = true } 17 | once_cell = "1.18.0" 18 | dioxus-search-macro = { workspace = true } 19 | dioxus-search-shared = { workspace = true } 20 | 21 | [target.'cfg(target_family = "wasm")'.dependencies] 22 | getrandom = { workspace = true, features = ["js"] } 23 | -------------------------------------------------------------------------------- /packages/search/search/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub use once_cell; 2 | pub use yazi; 3 | 4 | pub use dioxus_search_macro::load_search_index; 5 | pub use dioxus_search_shared::*; 6 | 7 | pub type LazySearchIndex = once_cell::sync::Lazy>; 8 | -------------------------------------------------------------------------------- /tailwind.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss"; 2 | @source "./src/**/*.{rs,html,css}"; 3 | 4 | @theme { 5 | --color-dxorange: #E96020; 6 | --color-dxblue: #00A8D6; 7 | --color-ghmetal: #24292f; 8 | --color-ghdarkmetal: #161b22; 9 | --color-ideblack: #0e1116; 10 | 11 | --font-sans: "Inter var",sans-serif; 12 | 13 | --bodx-shadow-3xl: 0 35px 60px -15px rgb(0 0 0 / 0.5); 14 | --bodx-shadow-cutesy: 0px 0px 40px -5px rgb(255 255 255 / 0.2); 15 | --bodx-shadow-pop: 0px 0px 10px -2px rgb(0 0 0 / 0.1); 16 | 17 | --key-frames-fadein: { 18 | from: { 19 | opacity: 0; 20 | } 21 | 22 | to: { 23 | opacity: 1; 24 | } 25 | } 26 | 27 | --animation-fadein-medium: fadein 500ms ease-in-out forwards; 28 | --my-grid-cols: auto 1fr auto; 29 | } 30 | 31 | --------------------------------------------------------------------------------