From 7f8c963cd9f9510814724a75c9643ca110a6b66f Mon Sep 17 00:00:00 2001 From: marc2332 Date: Sat, 16 Sep 2023 19:03:27 +0200 Subject: [PATCH] fix: Update doc links from v3 to v4 --- packages/autofmt/README.md | 10 ++-------- packages/check/README.md | 10 +++------- packages/check/src/issues.rs | 6 +++--- packages/core-macro/README.md | 9 ++------- packages/desktop/Cargo.toml | 2 +- packages/desktop/README.md | 12 +++--------- packages/desktop/src/readme.md | 4 +--- packages/dioxus-tui/Cargo.toml | 2 +- packages/dioxus/Cargo.toml | 2 +- packages/dioxus/README.md | 21 +++++++++++++-------- packages/fullstack/README.md | 2 +- packages/hooks/README.md | 9 ++------- packages/hot-reload/Cargo.toml | 2 +- packages/hot-reload/README.md | 15 ++++++++------- packages/html/README.md | 15 ++++----------- packages/interpreter/README.md | 9 ++------- packages/liveview/Cargo.toml | 2 +- packages/liveview/README.md | 8 ++------ packages/mobile/Cargo.toml | 2 +- packages/mobile/README.md | 13 +++---------- packages/native-core-macro/README.md | 8 ++------ packages/router/README.md | 2 +- packages/rsx-rosetta/README.md | 9 ++------- packages/rsx/README.md | 8 ++------ packages/ssr/Cargo.toml | 1 - packages/ssr/README.md | 13 ++++--------- packages/web/Cargo.toml | 2 +- packages/web/README.md | 7 ++----- translations/ja-jp/README.md | 2 +- 29 files changed, 70 insertions(+), 137 deletions(-) diff --git a/packages/autofmt/README.md b/packages/autofmt/README.md index bd934f2c79..0b13dc7a95 100644 --- a/packages/autofmt/README.md +++ b/packages/autofmt/README.md @@ -1,6 +1,5 @@ # dioxus-autofmt - [![Crates.io][crates-badge]][crates-url] [![MIT licensed][mit-badge]][mit-url] [![Build Status][actions-badge]][actions-url] @@ -8,38 +7,33 @@ [crates-badge]: https://img.shields.io/crates/v/dioxus-autofmt.svg [crates-url]: https://crates.io/crates/dioxus-autofmt - [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE - [actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg [actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster - [discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/dioxus-autofmt/latest/dioxus_autofmt) | [Chat](https://discord.gg/XgGxMSkvUM) - ## Overview `dioxus-autofmt` provides a pretty printer for the `rsx` syntax tree. - This is done manually with a via set of formatting rules. The output is not guaranteed to be stable between minor versions of the crate as we might tweak the output. `dioxus-autofmt` provides an API to perform precision edits as well as just spit out a block of formatted RSX from any RSX syntax tree. This is used by the `rsx-rosetta` crate which can accept various input languages and output valid RSX. - ## Contributing - Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues). - Join the discord and ask questions! ## License + This project is licensed under the [MIT license]. [mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT diff --git a/packages/check/README.md b/packages/check/README.md index 512eb579a0..0bb6ce0a47 100644 --- a/packages/check/README.md +++ b/packages/check/README.md @@ -1,6 +1,5 @@ # dioxus-check - [![Crates.io][crates-badge]][crates-url] [![MIT licensed][mit-badge]][mit-url] [![Build Status][actions-badge]][actions-url] @@ -8,25 +7,21 @@ [crates-badge]: https://img.shields.io/crates/v/dioxus-autofmt.svg [crates-url]: https://crates.io/crates/dioxus-autofmt - [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE - [actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg [actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster - [discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/dioxus-autofmt/latest/dioxus_autofmt) | [Chat](https://discord.gg/XgGxMSkvUM) - ## Overview -`dioxus-check` analyzes Dioxus source code and reports errors and warnings. Primarily, it enforces the [Rules of Hooks](https://dioxuslabs.com/docs/0.3/guide/en/interactivity/hooks.html#no-hooks-in-conditionals). +`dioxus-check` analyzes Dioxus source code and reports errors and warnings. Primarily, it enforces the [Rules of Hooks](https://dioxuslabs.com/learn/0.4/reference/hooks#rules-of-hooks). ## Contributing @@ -34,6 +29,7 @@ - Join the discord and ask questions! ## License + This project is licensed under the [MIT license]. [mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT diff --git a/packages/check/src/issues.rs b/packages/check/src/issues.rs index 9893cde257..34d20eaef2 100644 --- a/packages/check/src/issues.rs +++ b/packages/check/src/issues.rs @@ -158,11 +158,11 @@ impl Display for IssueReport { #[allow(clippy::enum_variant_names)] // we'll add non-hook ones in the future /// Issues that might be found via static analysis of a Dioxus file. pub enum Issue { - /// https://dioxuslabs.com/docs/0.3/guide/en/interactivity/hooks.html#no-hooks-in-conditionals + /// https://dioxuslabs.com/learn/0.4/reference/hooks#no-hooks-in-conditionals HookInsideConditional(HookInfo, ConditionalInfo), - /// https://dioxuslabs.com/docs/0.3/guide/en/interactivity/hooks.html#no-hooks-in-loops + /// https://dioxuslabs.com/learn/0.4/reference/hooks#no-hooks-in-loops HookInsideLoop(HookInfo, AnyLoopInfo), - /// https://dioxuslabs.com/docs/0.3/guide/en/interactivity/hooks.html#no-hooks-in-closures + /// https://dioxuslabs.com/learn/0.4/reference/hooks#no-hooks-in-closures HookInsideClosure(HookInfo, ClosureInfo), HookOutsideComponent(HookInfo), } diff --git a/packages/core-macro/README.md b/packages/core-macro/README.md index bcf1572cf6..31b0cca903 100644 --- a/packages/core-macro/README.md +++ b/packages/core-macro/README.md @@ -1,6 +1,5 @@ # dioxus-core-macro - [![Crates.io][crates-badge]][crates-url] [![MIT licensed][mit-badge]][mit-url] [![Build Status][actions-badge]][actions-url] @@ -8,22 +7,18 @@ [crates-badge]: https://img.shields.io/crates/v/dioxus-core-macro.svg [crates-url]: https://crates.io/crates/dioxus-core-macro - [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE - [actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg [actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster - [discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/dioxus-core-macro/latest/dioxus_core_macro) | [Chat](https://discord.gg/XgGxMSkvUM) - ## Overview `dioxus-core-macro` provides a handful of helpful macros used by the `dioxus` crate. These include: @@ -32,13 +27,13 @@ - The `inline_props` macro transforms function arguments into an auto-derived struct - The `format_args_f` macro which allows f-string formatting with support for expressions - ## Contributing - Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues). - Join the discord and ask questions! ## License + This project is licensed under the [MIT license]. [mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT diff --git a/packages/desktop/Cargo.toml b/packages/desktop/Cargo.toml index 8749199c3a..7feb293c6f 100644 --- a/packages/desktop/Cargo.toml +++ b/packages/desktop/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" description = "WebView renderer for Dioxus" license = "MIT OR Apache-2.0" repository = "https://github.com/DioxusLabs/dioxus/" -homepage = "https://dioxuslabs.com/docs/0.3/guide/en/getting_started/desktop.html" +homepage = "https://dioxuslabs.com/learn/0.4/getting_started/desktop" keywords = ["dom", "ui", "gui", "react"] [dependencies] diff --git a/packages/desktop/README.md b/packages/desktop/README.md index 964f904956..0d0e262479 100644 --- a/packages/desktop/README.md +++ b/packages/desktop/README.md @@ -1,6 +1,5 @@ # Dioxus Desktop (webview) - [![Crates.io][crates-badge]][crates-url] [![MIT licensed][mit-badge]][mit-url] [![Build Status][actions-badge]][actions-url] @@ -8,31 +7,25 @@ [crates-badge]: https://img.shields.io/crates/v/dioxus-desktop.svg [crates-url]: https://crates.io/crates/dioxus-desktop - [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE - [actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg [actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster - [discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/dioxus-desktop/latest/dioxus_desktop) | [Chat](https://discord.gg/XgGxMSkvUM) - ## Overview `dioxus-desktop` provides a webview-based desktop renderer for the Dioxus VirtualDom. This requires that webview is installed on the target system. WebView is installed by default on macOS and iOS devices, but might not come preinstalled on Windows or Linux devices. To fix these issues, follow the [instructions in the guide](guide-url). -[guide-url]: https://dioxuslabs.com/docs/0.3/guide/en/getting_started/desktop.html - - +[guide-url]: https://dioxuslabs.com/learn/0.4/getting_started/desktop ## Features @@ -48,6 +41,7 @@ This requires that webview is installed on the target system. WebView is install - Join the discord and ask questions! ## License + This project is licensed under the [MIT license]. [mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT diff --git a/packages/desktop/src/readme.md b/packages/desktop/src/readme.md index cd4dbe41a9..ac2205b4c1 100644 --- a/packages/desktop/src/readme.md +++ b/packages/desktop/src/readme.md @@ -8,7 +8,6 @@ One of Dioxus' flagship features is the ability to quickly build a native deskto Dioxus Desktop is built off Tauri. Right now there aren't any Dioxus abstractions over the menubar, handling, etc, so you'll want to leverage Tauri - mostly [Wry](http://github.com/tauri-apps/wry/) and [Tao](http://github.com/tauri-apps/tao) directly. An upcoming release of Dioxus-Desktop will include components and hooks for notifications, global shortcuts, menubar, etc. - ## Getting Set up Getting Set up with Dioxus-Desktop is quite easy. Make sure you have Rust and Cargo installed, and then create a new project: @@ -44,9 +43,8 @@ fn app(cx: Scope) -> Element { } ``` - To configure the webview, menubar, and other important desktop-specific features, checkout out some of the launch configuration in the [API reference](https://docs.rs/dioxus-desktop/). ## Future Steps -Make sure to read the [Dioxus Guide](https://dioxuslabs.com/docs/0.3/guide/en) if you already haven't! +Make sure to read the [Dioxus Guide](https://dioxuslabs.com/learn/0.4/) if you already haven't! diff --git a/packages/dioxus-tui/Cargo.toml b/packages/dioxus-tui/Cargo.toml index 1286ca0102..0d0bb59f4b 100644 --- a/packages/dioxus-tui/Cargo.toml +++ b/packages/dioxus-tui/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Jonathan Kelley, Evan Almloff"] edition = "2021" description = "TUI-based renderer for Dioxus" repository = "https://github.com/DioxusLabs/dioxus/" -homepage = "https://dioxuslabs.com/docs/0.3/guide/en/getting_started/tui.html" +homepage = "https://dioxuslabs.com/learn/0.4/getting_started/tui" keywords = ["dom", "ui", "gui", "react", "terminal"] license = "MIT OR Apache-2.0" diff --git a/packages/dioxus/Cargo.toml b/packages/dioxus/Cargo.toml index 72da450134..2c284bf1a3 100644 --- a/packages/dioxus/Cargo.toml +++ b/packages/dioxus/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" description = "Portable, performant, and ergonomic framework for building cross-platform user interfaces in Rust" license = "MIT OR Apache-2.0" repository = "https://github.com/DioxusLabs/dioxus/" -homepage = "https://dioxuslabs.com/docs/0.3/guide/en/index.html" +homepage = "https://dioxuslabs.com/learn/0.4/" keywords = ["dom", "ui", "gui", "react", "wasm"] rust-version = "1.65.0" diff --git a/packages/dioxus/README.md b/packages/dioxus/README.md index 62dd99087d..5bbb37aa07 100644 --- a/packages/dioxus/README.md +++ b/packages/dioxus/README.md @@ -9,8 +9,8 @@ This overview provides a brief introduction to Dioxus. For a more in-depth guide, make sure to check out: -- [Getting Started](https://dioxuslabs.com/docs/0.3/guide/en/getting_started/index.html) -- [Book (0.3)](https://dioxuslabs.com/docs/0.3/guide/en/) +- [Getting Started](https://dioxuslabs.com/learn/0.4/getting_started) +- [Book (0.4)](https://dioxuslabs.com/learn/0.4/) - [Examples](https://github.com/DioxusLabs/example-projects) # Overview and Goals @@ -27,7 +27,7 @@ Dioxus is heavily inspired by React, supporting many of the same concepts: If you know React, then you know Dioxus. -Dioxus is *substantially* more performant than many of the other Rust UI libraries (Yew/Percy) and is *significantly* more performant +Dioxus is _substantially_ more performant than many of the other Rust UI libraries (Yew/Percy) and is _significantly_ more performant than React—roughly competitive with InfernoJS. Remember: Dioxus is a library for declaring interactive user interfaces—it is not a dedicated renderer. Most 1st party renderers for Dioxus currently only support web technologies. @@ -62,7 +62,7 @@ macro or the NodeFactory API. For the most part, you want to use the `rsx!` macro. Any element in `rsx!` can have attributes, listeners, and children. For -consistency, we force all attributes and listeners to be listed *before* +consistency, we force all attributes and listeners to be listed _before_ children. ```rust, ignore @@ -190,6 +190,7 @@ fn Header(cx: Scope, title: String, color: String) -> Element { Components may also borrow data from their parent component. We just need to attach some lifetimes to the props struct. + > Note: we don't need to derive `PartialEq` for borrowed props since they cannot be memoized. ```rust, ignore @@ -251,9 +252,10 @@ fn App(cx: Scope) -> Element { Hooks are sensitive to how they are used. To use hooks, you must abide by the ["rules of hooks" (borrowed from React)](https://reactjs.org/docs/hooks-rules.html): -- Functions with "use_" should not be called in callbacks -- Functions with "use_" should not be called out of order -- Functions with "use_" should not be called in loops or conditionals + +- Functions with "use\_" should not be called in callbacks +- Functions with "use\_" should not be called out of order +- Functions with "use\_" should not be called in loops or conditionals In a sense, hooks let us add a field of state to our component without declaring an explicit state struct. However, this means we need to "load" the struct in the right @@ -307,6 +309,7 @@ This overview doesn't cover everything. Make sure to check out the tutorial and website for more details. Beyond this overview, Dioxus supports: + - Server-side rendering - Concurrent rendering (with async support) - Web/Desktop/Mobile support @@ -323,14 +326,16 @@ Good luck! ## Inspiration, Resources, Alternatives, and Credits Dioxus is inspired by: + - React: for its hooks, concurrency, suspense - Dodrio: for its research in bump allocation, double buffering, and diffing architecture Alternatives to Dioxus include: + - Yew: supports function components and web, but no SSR, borrowed data, or bump allocation. Rather slow at times. - Percy: supports function components, web, ssr, but lacks state management - Sycamore: supports function components, web, ssr, but is closer to SolidJS than React - MoonZoom/Seed: opinionated frameworks based on the Elm model (message, update)—no hooks -We've put a lot of work into making Dioxus ergonomic and *familiar*. +We've put a lot of work into making Dioxus ergonomic and _familiar_. Our target audience is TypeScript developers looking to switch to Rust for the web—so we need to be comparable to React. diff --git a/packages/fullstack/README.md b/packages/fullstack/README.md index ecd003ee80..3128c3598b 100644 --- a/packages/fullstack/README.md +++ b/packages/fullstack/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/dioxus-fullstack/latest/dioxus_sever) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/hooks/README.md b/packages/hooks/README.md index 6c77867de5..932847b53c 100644 --- a/packages/hooks/README.md +++ b/packages/hooks/README.md @@ -1,6 +1,5 @@ # Dioxus Hooks - [![Crates.io][crates-badge]][crates-url] [![MIT licensed][mit-badge]][mit-url] [![Build Status][actions-badge]][actions-url] @@ -8,22 +7,18 @@ [crates-badge]: https://img.shields.io/crates/v/dioxus-hooks.svg [crates-url]: https://crates.io/crates/dioxus-hooks - [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE - [actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg [actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster - [discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/dioxus-hooks/latest/dioxus_hooks) | [Chat](https://discord.gg/XgGxMSkvUM) - ## Overview `dioxus-hooks` includes some basic useful hooks for dioxus: @@ -42,13 +37,13 @@ This crate also provides a few helpful macros to get around some Rust lifetime m - `use_future!()` - `use_callback!()` - ## Contributing - Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues). - Join the discord and ask questions! ## License + This project is licensed under the [MIT license]. [mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT diff --git a/packages/hot-reload/Cargo.toml b/packages/hot-reload/Cargo.toml index 38eecc8bdc..b724ad685c 100644 --- a/packages/hot-reload/Cargo.toml +++ b/packages/hot-reload/Cargo.toml @@ -5,7 +5,7 @@ version = { workspace = true } edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/DioxusLabs/dioxus/" -homepage = "https://dioxuslabs.com/docs/0.3/guide/en/getting_started/hot_reload.html" +homepage = "https://dioxuslabs.com/learn/0.4/migration/hot_reload" description = "Hot reloading utilities for Dioxus" keywords = ["dom", "ui", "gui", "react", "hot-reloading"] diff --git a/packages/hot-reload/README.md b/packages/hot-reload/README.md index 60b7b9c873..d7418d4b1a 100644 --- a/packages/hot-reload/README.md +++ b/packages/hot-reload/README.md @@ -1,6 +1,5 @@ # `dioxus-hot-reload`: Hot Reloading Utilites for Dioxus - [![Crates.io][crates-badge]][crates-url] [![MIT licensed][mit-badge]][mit-url] [![Build Status][actions-badge]][actions-url] @@ -8,28 +7,24 @@ [crates-badge]: https://img.shields.io/crates/v/dioxus-hot-reload.svg [crates-url]: https://crates.io/crates/dioxus-hot-reload - [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE - [actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg [actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster - [discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/dioxus-hot-reload/latest/dioxus_hot_reload) | [Chat](https://discord.gg/XgGxMSkvUM) - ## Overview Dioxus supports hot reloading for static parts of rsx macros. This enables changing the styling of your application without recompiling the rust code. This is useful for rapid iteration on the styling of your application. - Hot reloading could update the following change without recompiling: + ```rust rsx! { div { @@ -37,7 +32,9 @@ rsx! { } } ``` + => + ```rust rsx! { div { @@ -49,6 +46,7 @@ rsx! { ``` But it could not update the following change: + ```rust rsx! { div { @@ -56,7 +54,9 @@ rsx! { } } ``` + => + ```rust rsx! { div { @@ -161,6 +161,7 @@ async fn launch(app: Component) { - Join the discord and ask questions! ## License + This project is licensed under the [MIT license]. [mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT diff --git a/packages/html/README.md b/packages/html/README.md index 59ec2f9ffe..93733116cf 100644 --- a/packages/html/README.md +++ b/packages/html/README.md @@ -1,6 +1,5 @@ # `dioxus-html`: Html (and SVG) Namespace for Dioxus - [![Crates.io][crates-badge]][crates-url] [![MIT licensed][mit-badge]][mit-url] [![Build Status][actions-badge]][actions-url] @@ -8,22 +7,18 @@ [crates-badge]: https://img.shields.io/crates/v/dioxus-html.svg [crates-url]: https://crates.io/crates/dioxus-html - [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE - [actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg [actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster - [discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/dioxus-html/latest/dioxus_html) | [Chat](https://discord.gg/XgGxMSkvUM) - ## Overview The Dioxus `rsx!` and `html!` macros can accept any compile-time correct namespace on top of NodeFactory. This crate provides the HTML (and SVG) namespaces which get imported in the Dioxus prelude. @@ -64,6 +59,7 @@ All elements should be defined as a zero-sized-struct (also known as unit struct Attributes would then be implemented as constants on these unit structs. The HTML namespace is defined mostly with macros. However, the expanded form would look something like this: + ```rust struct base; impl DioxusElement for base { @@ -75,8 +71,8 @@ impl base { const target: (&'static str, Option<'static str>, bool) = ("target", None, false); } ``` -Because attributes are defined as methods on the unit struct, they guard the attribute creation behind a compile-time correct interface. +Because attributes are defined as methods on the unit struct, they guard the attribute creation behind a compile-time correct interface. ## How to extend it: @@ -93,16 +89,13 @@ mod dioxus_elements { } ``` - - - - ## Contributing - Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues). - Join the discord and ask questions! ## License + This project is licensed under the [MIT license]. [mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT diff --git a/packages/interpreter/README.md b/packages/interpreter/README.md index 90e390f569..0c195d681e 100644 --- a/packages/interpreter/README.md +++ b/packages/interpreter/README.md @@ -1,6 +1,5 @@ # `dioxus-interpreter-js` - [![Crates.io][crates-badge]][crates-url] [![MIT licensed][mit-badge]][mit-url] [![Build Status][actions-badge]][actions-url] @@ -8,35 +7,31 @@ [crates-badge]: https://img.shields.io/crates/v/dioxus-interpreter-js.svg [crates-url]: https://crates.io/crates/dioxus-interpreter-js - [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE - [actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg [actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster - [discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/dioxus-interpreter-js/latest/dioxus_interpreter_js) | [Chat](https://discord.gg/XgGxMSkvUM) - ## Overview `dioxus-interpreter-js` provides the high-performance JavaScript glue that interprets the stream of edits produced by the Dioxus VirtualDom and converts them into mutations on the actual web DOM. This crate features bindings for the web and sledgehammer for increased performance. - ## Contributing - Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues). - Join the discord and ask questions! ## License + This project is licensed under the [MIT license]. [mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT diff --git a/packages/liveview/Cargo.toml b/packages/liveview/Cargo.toml index 6b4e49eb25..cbd7b75f5d 100644 --- a/packages/liveview/Cargo.toml +++ b/packages/liveview/Cargo.toml @@ -3,7 +3,7 @@ name = "dioxus-liveview" version = { workspace = true } edition = "2021" repository = "https://github.com/DioxusLabs/dioxus/" -homepage = "https://dioxuslabs.com/docs/0.3/guide/en/getting_started/liveview.html" +homepage = "https://dioxuslabs.com/learn/0.4/getting_started/liveview" keywords = ["dom", "ui", "gui", "react", "liveview"] description = "Build server-side apps with Dioxus" authors = ["Jonathan Kelley", "Evan Almloff"] diff --git a/packages/liveview/README.md b/packages/liveview/README.md index 0a0e7de3ad..cbae3c53ac 100644 --- a/packages/liveview/README.md +++ b/packages/liveview/README.md @@ -1,6 +1,5 @@ # Dioxus Liveview - [![Crates.io][crates-badge]][crates-url] [![MIT licensed][mit-badge]][mit-url] [![Build Status][actions-badge]][actions-url] @@ -8,22 +7,18 @@ [crates-badge]: https://img.shields.io/crates/v/dioxus-liveview.svg [crates-url]: https://crates.io/crates/dioxus-liveview - [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE - [actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg [actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster - [discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/dioxus-liveview/latest/dioxus_liveview) | [Chat](https://discord.gg/XgGxMSkvUM) - ## Overview `dioxus-liveview` provides adapters for running the Dioxus VirtualDom over a WebSocket connection. @@ -46,6 +41,7 @@ Dioxus-LiveView exports some primitives to wire up an app into an existing backe - Join the discord and ask questions! ## License + This project is licensed under the [MIT license]. [mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT diff --git a/packages/mobile/Cargo.toml b/packages/mobile/Cargo.toml index 9c6d512702..c0d84c8d4d 100644 --- a/packages/mobile/Cargo.toml +++ b/packages/mobile/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Jonathan Kelley"] edition = "2018" description = "Mobile-compatible renderer for Dioxus" repository = "https://github.com/DioxusLabs/dioxus/" -homepage = "https://dioxuslabs.com/docs/0.3/guide/en/getting_started/mobile.html" +homepage = "https://dioxuslabs.com/learn/0.4/getting_started/mobile" keywords = ["dom", "ui", "gui", "react"] license = "MIT OR Apache-2.0" diff --git a/packages/mobile/README.md b/packages/mobile/README.md index 46da9061a6..611348da54 100644 --- a/packages/mobile/README.md +++ b/packages/mobile/README.md @@ -7,29 +7,24 @@ [crates-badge]: https://img.shields.io/crates/v/dioxus-mobile.svg [crates-url]: https://crates.io/crates/dioxus-mobile - [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE - [actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg [actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster - [discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/dioxus-mobile/latest/dioxus_mobile) | [Chat](https://discord.gg/XgGxMSkvUM) - ## Overview `dioxus-mobile` is a re-export of `dioxus-desktop` with some minor tweaks and documentation changes. As this crate evolves, it will provide some more unique features to mobile, but for now, it's very similar to the desktop crate. Dioxus Mobile supports both iOS and Android. However, Android support is still quite experimental and requires a lot of configuration. A good area to contribute here would be to improve the CLI tool to include bundling and mobile configuration. - ## Getting Set up Getting set up with mobile can but quite challenging. The tooling here isn't great (yet) and might take some hacking around to get things working. macOS M1 is broadly unexplored and might not work for you. @@ -40,7 +35,6 @@ We're going to be using `cargo-mobile` to build for mobile. First, install it: $ cargo install --git https://github.com/BrainiumLLC/cargo-mobile ``` - And then initialize your app for the right platform. Use the `winit` template for now. Right now, there's no "Dioxus" template in cargo-mobile. ```shell @@ -98,9 +92,7 @@ To configure the web view, menubar, and other important desktop-specific feature ## Future Steps -Make sure to read the [Dioxus Guide](https://dioxuslabs.com/docs/0.3/guide/en) if you already haven't! - - +Make sure to read the [Dioxus Guide](https://dioxuslabs.com/learn/0.4/) if you already haven't! ## Contributing @@ -108,6 +100,7 @@ Make sure to read the [Dioxus Guide](https://dioxuslabs.com/docs/0.3/guide/en) i - Join the discord and ask questions! ## License + This project is licensed under the [MIT license]. [mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT diff --git a/packages/native-core-macro/README.md b/packages/native-core-macro/README.md index 6b8c13590d..4cf19cecef 100644 --- a/packages/native-core-macro/README.md +++ b/packages/native-core-macro/README.md @@ -7,33 +7,29 @@ [crates-badge]: https://img.shields.io/crates/v/dioxus-native-core-macro.svg [crates-url]: https://crates.io/crates/dioxus-native-core-macro - [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE - [actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg [actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster - [discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/dioxus-native-core-macro/latest/dioxus_native_core_macro) | [Chat](https://discord.gg/XgGxMSkvUM) - ## Overview `dioxus-native-core-macro` provides a handful of macros used by native-core for native renderers like TUI, Blitz, and Freya to derive their state. - ## Contributing - Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues). - Join the discord and ask questions! ## License + This project is licensed under the [MIT license]. [mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT diff --git a/packages/router/README.md b/packages/router/README.md index 4d4547f12a..f83fa63cff 100644 --- a/packages/router/README.md +++ b/packages/router/README.md @@ -15,7 +15,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/router/) | +[Guides](https://dioxuslabs.com/learn/0.4/router/) | [API Docs](https://docs.rs/dioxus-router/latest/dioxus_router) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/rsx-rosetta/README.md b/packages/rsx-rosetta/README.md index da3049d3cd..f046838c4e 100644 --- a/packages/rsx-rosetta/README.md +++ b/packages/rsx-rosetta/README.md @@ -1,5 +1,3 @@ - - # `rsx-rosetta` [![Crates.io][crates-badge]][crates-url] @@ -9,18 +7,15 @@ [crates-badge]: https://img.shields.io/crates/v/rsx-rosetta.svg [crates-url]: https://crates.io/crates/rsx-rosetta - [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE - [actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg [actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster - [discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/rsx-rosetta/latest/rsx-rosetta) | [Chat](https://discord.gg/XgGxMSkvUM) @@ -49,6 +44,7 @@ From there, you can convert directly to a string or into some other AST. - Join the discord and ask questions! ## License + This project is licensed under the [MIT license]. [mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT @@ -56,4 +52,3 @@ This project is licensed under the [MIT license]. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Dioxus by you, shall be licensed as MIT, without any additional terms or conditions. - diff --git a/packages/rsx/README.md b/packages/rsx/README.md index c20737167a..61502fb17c 100644 --- a/packages/rsx/README.md +++ b/packages/rsx/README.md @@ -7,22 +7,18 @@ [crates-badge]: https://img.shields.io/crates/v/dioxus-rsx.svg [crates-url]: https://crates.io/crates/dioxus-rsx - [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE - [actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg [actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster - [discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/dioxus-rsx/latest/dioxus_rsx) | [Chat](https://discord.gg/XgGxMSkvUM) - ## Overview This crate provides the actual DSL that Dioxus uses in the `rsx!` macro. This crate is separate from the macro crate to enable tooling like autoformat, translation, and AST manipulation (extract to component). @@ -33,6 +29,7 @@ This crate provides the actual DSL that Dioxus uses in the `rsx!` macro. This cr - Join the discord and ask questions! ## License + This project is licensed under the [MIT license]. [mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT @@ -40,4 +37,3 @@ This project is licensed under the [MIT license]. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Dioxus by you shall be licensed as MIT, without any additional terms or conditions. - diff --git a/packages/ssr/Cargo.toml b/packages/ssr/Cargo.toml index 5804c6b5eb..f6376452d0 100644 --- a/packages/ssr/Cargo.toml +++ b/packages/ssr/Cargo.toml @@ -6,7 +6,6 @@ edition = "2018" description = "Dioxus render-to-string" license = "MIT OR Apache-2.0" repository = "https://github.com/DioxusLabs/dioxus/" -homepage = "https://dioxuslabs.com/docs/0.3/guide/en/getting_started/ssr.html" keywords = ["dom", "ui", "gui", "react", "ssr"] [dependencies] diff --git a/packages/ssr/README.md b/packages/ssr/README.md index c5b91b7b88..59dbfbacf4 100644 --- a/packages/ssr/README.md +++ b/packages/ssr/README.md @@ -6,10 +6,11 @@ ## Resources + This crate is a part of the broader Dioxus ecosystem. For more resources about Dioxus, check out: -- [Getting Started](https://dioxuslabs.com/docs/0.3/guide/en/getting_started/index.html) -- [Book](https://dioxuslabs.com/docs/0.3/guide/en/) +- [Getting Started](https://dioxuslabs.com/learn/0.4/getting_started) +- [Book](https://dioxuslabs.com/learn/0.4/) - [Examples](https://github.com/DioxusLabs/example-projects) ## Overview @@ -26,7 +27,6 @@ let text = dioxus_ssr::render(&vdom); assert_eq!(text, "
hello world!
") ``` - ## Basic Usage The simplest example is to simply render some `rsx!` nodes to HTML. This can be done with the [`render_lazy`] API. @@ -50,15 +50,11 @@ let _ = vdom.rebuild(); let content = dioxus_ssr::render(&vdom); ``` - - - - ## Usage in pre-rendering This crate is particularly useful in pre-generating pages server-side and then selectively loading Dioxus client-side to pick up the reactive elements. -This crate supports hydration out of the box. However, both the client and server must generate the *exact* same VirtualDOMs - the client picks up its VirtualDOM assuming that the pre-rendered page output is the same. To do this, you need to make sure that your VirtualDOM implementation is deterministic! This could involve either serializing our app state and sending it to the client, hydrating only parts of the page, or building tests to ensure what's rendered on the server is the same as the client. +This crate supports hydration out of the box. However, both the client and server must generate the _exact_ same VirtualDOMs - the client picks up its VirtualDOM assuming that the pre-rendered page output is the same. To do this, you need to make sure that your VirtualDOM implementation is deterministic! This could involve either serializing our app state and sending it to the client, hydrating only parts of the page, or building tests to ensure what's rendered on the server is the same as the client. With pre-rendering enabled, this crate will generate element nodes with Element IDs pre-associated. During hydration, the Dioxus-WebSys renderer will attach the Virtual nodes to these real nodes after a page query. @@ -107,5 +103,4 @@ let text = render_lazy!(rsx!( div { "hello world" } )); Dioxus SSR is a powerful tool to generate static sites. Using Dioxus for static site generation _is_ a bit overkill, however. The new documentation generation library, Doxie, is essentially Dioxus SSR on steroids designed for static site generation with client-side hydration. - Again, simply render the VirtualDOM to a string using `render` or any of the other render methods. diff --git a/packages/web/Cargo.toml b/packages/web/Cargo.toml index dda54395d8..35eb9c5f16 100644 --- a/packages/web/Cargo.toml +++ b/packages/web/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" description = "Web renderer for Dioxus using websys" license = "MIT OR Apache-2.0" repository = "https://github.com/DioxusLabs/dioxus/" -homepage = "https://dioxuslabs.com/docs/0.3/guide/en/getting_started/web.html" +homepage = "https://dioxuslabs.com/learn/0.4/getting_started/wasm" keywords = ["dom", "ui", "gui", "react", "wasm"] [dependencies] diff --git a/packages/web/README.md b/packages/web/README.md index 87265c926b..561da808ce 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -7,18 +7,15 @@ [crates-badge]: https://img.shields.io/crates/v/dioxus-web.svg [crates-url]: https://crates.io/crates/dioxus-web - [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE - [actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg [actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster - [discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | +[Guides](https://dioxuslabs.com/learn/0.4/) | [API Docs](https://docs.rs/dioxus-web/latest/dioxus_web) | [Chat](https://discord.gg/XgGxMSkvUM) @@ -36,6 +33,7 @@ Run Dioxus in the browser using WebAssembly. - Join the discord and ask questions! ## License + This project is licensed under the [MIT license]. [mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT @@ -43,4 +41,3 @@ This project is licensed under the [MIT license]. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Dioxus by you shall be licensed as MIT without any additional terms or conditions. - diff --git a/translations/ja-jp/README.md b/translations/ja-jp/README.md index 342a99cdb4..b678eb9891 100644 --- a/translations/ja-jp/README.md +++ b/translations/ja-jp/README.md @@ -40,7 +40,7 @@ | | - ガイド + ガイド | 中文 |