diff --git a/README.md b/README.md
index 20cdfce12..d19a9dcee 100644
--- a/README.md
+++ b/README.md
@@ -45,7 +45,7 @@
| Examples |
- Guide
+ Guide | 中文 |
@@ -73,8 +73,8 @@ fn app() -> Element {
}
```
-
## ⭐️ Unique features:
+
- Cross-platform apps in three lines of code (web, desktop, mobile, server, and more)
- [Ergonomic state management](https://dioxuslabs.com/blog/release-050) combines the best of React, Solid, and Svelte
- Extremely performant, powered by Rust's fastest wasm-framework [sledgehammer](https://dioxuslabs.com/blog/templates-diffing)
@@ -82,6 +82,7 @@ fn app() -> Element {
- And more! Read the [take a tour of Dioxus](https://dioxuslabs.com/learn/0.5/).
## Instant hot-reloading
+
With one command, `dx serve` and your app is running. Edit your markup and styles and see the results in real time. Rust code hotreloading is not yet 1st class, but possible with [hot-lib-reloader](https://docs.rs/hot-lib-reloader/latest/hot_lib_reloader/).
@@ -96,7 +97,6 @@ Simply run `dx bundle` and your app will be built and bundled with maximization
-
## Fantastic documentation
We've put a ton of effort into building clean, readable, and comprehensive documentation. All html elements and listeners are documented with MDN docs, and our docsite runs continuous integration with Dioxus itself to ensure that the docs are always up to date. Check out the [Dioxus website](https://dioxuslabs.com/learn/0.5/) for guides, references, recipes, and more. Fun fact: we use the Dioxus website as a testbed for new diouxs features - [check it out!](https://github.com/dioxusLabs/docsite)
@@ -121,12 +121,12 @@ Dioxus is a community-driven project, with a very active [Discord](https://disco
-
## Full-time core team
Dioxus has grown from a side project to a small team of fulltime engineers. Thanks to the generous support of FutureWei, Satellite.im, the GitHub Accelerator program, we're able to work on Dioxus full-time. Our long term goal is for Dioxus to become self-sustaining by providing paid high-quality enterprise tools. If your company is interested in adopting Dioxus and would like to work with us, please reach out!
## Supported Platforms
+
@@ -225,7 +225,7 @@ The examples in the top level of this repository can be run with `cargo run --ex
## Dioxus vs other frameworks
-We love all frameworks and enjoy watching innovation in the Rust ecosystem. In fact, many of our projects are shared with other frameworks. For example, our flex-box library [Taffy](https://github.com/DioxusLabs/taffy) is used by [Bevy](https://bevyengine.org/), [Zed](https://zed.dev/), [Lapce](https://lapce.dev/), [Iced](https://github.com/iced-rs/iced), and many more.
+We love all frameworks and enjoy watching innovation in the Rust ecosystem. In fact, many of our projects are shared with other frameworks. For example, our flex-box library [Taffy](https://github.com/DioxusLabs/taffy) is used by [Bevy](https://bevyengine.org/), [Zed](https://zed.dev/), [Lapce](https://lapce.dev/), [Iced](https://github.com/iced-rs/iced), and many more.
Dioxus places an emphasis on a few key points that make it different from other frameworks:
@@ -234,7 +234,6 @@ Dioxus places an emphasis on a few key points that make it different from other
- **Renderer-agnostic**: you can swap out the renderer for any platform you want thanks to [our fast VirtualDOM](https://dioxuslabs.com/blog/templates-diffing).
- **Collaborative**: whenever possible, we spin out crates like [Taffy](https://github.com/DioxusLabs/taffy), [magnanis](https://github.com/DioxusLabs/collect-assets), [include_mdbook](https://github.com/DioxusLabs/include_mdbook), and [blitz](http://github.com/dioxusLabs/blitz) so the ecosystem can grow together.
-
### Dioxus vs Tauri
Tauri is a framework for building desktop (and soon, mobile) apps where your frontend is written in a web-based framework like React, Vue, Svelte, etc. Whenever you need to do native work, you can write Rust functions and call them from your frontend.
@@ -252,6 +251,7 @@ Leptos is a library for building fullstack web-apps, similar to SolidJS and Soli
- **Reactivity model**: Leptos uses signals for its underlying reactivity, while Dioxus opts for a VirtualDom and re-renders. While in theory signals are more efficient, in practice, Dioxus' VirtualDom performs little-to-no actual diffing (thanks to our [block-dom inspired templates](https://dioxuslabs.com/blog/templates-diffing)) and is [actually faster than Leptos](https://krausest.github.io/js-framework-benchmark/2024/table_chrome_123.0.6312.59.html).
- **Control flow**: Because Leptos uses signals for reactivity, you are constrained to Leptos' primitives for things like `for` loops and `if` statements. If you get this wrong, your app will lose reactivity, leading to hard to debug UI issues. With Dioxus, you can use iterators, regular Rust `for` loops and `if` statements, and your app will still be reactive. In practice, a Dioxus component to insert counters into a list might look like this:
+
```rust
fn Counters() -> Element {
let mut counters = use_signal(|| vec![0; initial_length]);
@@ -269,7 +269,9 @@ fn Counters() -> Element {
}
}
```
+
[While in Leptos, you would need to track keys, use the `` component, create new signals, and manually clean up memory](https://book.leptos.dev/view/04_iteration.html#dynamic-rendering-with-the-for-component):
+
```rust
fn Counters() -> Element {
let initial_counters = (0..initial_length)
@@ -331,6 +333,7 @@ fn Counters() -> Element {
- **Different scopes**: Dioxus provides renderers for web, desktop, mobile, LiveView, and more. We also maintain community libraries and a cross-platform SDK. The scope of this work is huge, meaning we've historically released at a slower cadence than Leptos. Leptos focuses on the fullstack web, with features that Dioxus doesn't have like ``-based streaming HTML, islands, `` components, and other web-specific features. Generally, web apps you build with Leptos will have a smaller footprint.
- **Different DSLs**: While both frameworks target the web, Dioxus uses its own custom Rust-like DSL for building UIs while Leptos uses a more HTML-like syntax. We chose this to retain compatibility with IDE features like codefolding and syntax highlighting. Generally, Dioxus leans into more "magic" with its DSL. For example, dioxus will automatically format strings for you while Leptos requires you to use closures and `format!` or `format_args!`.
+
```rust
// dioxus
rsx! {
@@ -384,18 +387,18 @@ Dioxus and Electron are two entirely different projects with similar goals. Elec
- **Maturity**: Electron is a mature project with a large community and a lot of tooling. Dioxus is still quite young in comparison to Electron. Expect to run into features like deeplinking that require extra work to implement.
-
## Contributing
-- Check out the website [section on contributing](https://dioxuslabs.com/learn/0.4/contributing).
+
+- Check out the website [section on contributing](https://dioxuslabs.com/learn/0.5/contributing).
- Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues).
- [Join](https://discord.gg/XgGxMSkvUM) 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/examples/mobile_demo/README.md b/examples/mobile_demo/README.md
index bf0ec5166..4d5ea46ed 100644
--- a/examples/mobile_demo/README.md
+++ b/examples/mobile_demo/README.md
@@ -7,5 +7,5 @@ Right now, Dioxus supports mobile targets including iOS and Android. However, ou
This project was generated using [cargo-mobile2](https://github.com/tauri-apps/cargo-mobile2). We have yet to integrate this generation into the Dioxus-CLI. The open issue for this is [#1157](https://github.com/DioxusLabs/dioxus/issues/1157).
## Running this project
-Because the tooling and ecosystem is still young, Dioxus mobile can be difficult to setup and run. We have [detailed guides](https://dioxuslabs.com/learn/0.5/getting_started/mobile) for creating, building, and running on both iOS and Android.
+Because the tooling and ecosystem is still young, Dioxus mobile can be difficult to setup and run. We have [detailed guides](https://dioxuslabs.com/learn/0.5/getting_started) for creating, building, and running on both iOS and Android.
diff --git a/packages/check/src/issues.rs b/packages/check/src/issues.rs
index 81ffc0870..eec3b750a 100644
--- a/packages/check/src/issues.rs
+++ b/packages/check/src/issues.rs
@@ -159,11 +159,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/learn/0.4/reference/hooks#no-hooks-in-conditionals
+ /// https://dioxuslabs.com/learn/0.5/reference/hooks#no-hooks-in-conditionals
HookInsideConditional(HookInfo, ConditionalInfo),
- /// https://dioxuslabs.com/learn/0.4/reference/hooks#no-hooks-in-loops
+ /// https://dioxuslabs.com/learn/0.5/reference/hooks#no-hooks-in-loops
HookInsideLoop(HookInfo, AnyLoopInfo),
- /// https://dioxuslabs.com/learn/0.4/reference/hooks#no-hooks-in-closures
+ /// https://dioxuslabs.com/learn/0.5/reference/hooks#no-hooks-in-closures
HookInsideClosure(HookInfo, ClosureInfo),
HookOutsideComponent(HookInfo),
}
diff --git a/packages/core-macro/src/props/mod.rs b/packages/core-macro/src/props/mod.rs
index f0f8b7c8d..948bec5d3 100644
--- a/packages/core-macro/src/props/mod.rs
+++ b/packages/core-macro/src/props/mod.rs
@@ -1009,7 +1009,7 @@ Finally, call `.build()` to create the instance of `{name}`.
name: field_name, ..
} = field;
if *field_name == "key" {
- return Err(Error::new_spanned(field_name, "Naming a prop `key` is not allowed because the name can conflict with the built in key attribute. See https://dioxuslabs.com/learn/0.4/reference/dynamic_rendering#rendering-lists for more information about keys"));
+ return Err(Error::new_spanned(field_name, "Naming a prop `key` is not allowed because the name can conflict with the built in key attribute. See https://dioxuslabs.com/learn/0.5/reference/dynamic_rendering#rendering-lists for more information about keys"));
}
let StructInfo {
ref builder_name, ..
diff --git a/packages/desktop/Cargo.toml b/packages/desktop/Cargo.toml
index c9fd2323d..22632a8ae 100644
--- a/packages/desktop/Cargo.toml
+++ b/packages/desktop/Cargo.toml
@@ -6,7 +6,7 @@ edition = "2021"
description = "WebView renderer for Dioxus"
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
-homepage = "https://dioxuslabs.com/learn/0.4/getting_started/desktop"
+homepage = "https://dioxuslabs.com/learn/0.5/getting_started"
keywords = ["dom", "ui", "gui", "react"]
[dependencies]
diff --git a/packages/desktop/README.md b/packages/desktop/README.md
index d9aca2a49..e2827bcd1 100644
--- a/packages/desktop/README.md
+++ b/packages/desktop/README.md
@@ -25,7 +25,7 @@
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/learn/0.5/getting_started/desktop
+[guide-url]: https://dioxuslabs.com/learn/0.5/getting_started
## Features
diff --git a/packages/desktop/src/readme.md b/packages/desktop/src/readme.md
index f42276d38..1764d279a 100644
--- a/packages/desktop/src/readme.md
+++ b/packages/desktop/src/readme.md
@@ -47,4 +47,4 @@ To configure the webview, menubar, and other important desktop-specific features
## Future Steps
-Make sure to read the [Dioxus Guide](https://dioxuslabs.com/learn/0.4/) if you already haven't!
+Make sure to read the [Dioxus Guide](https://dioxuslabs.com/learn/0.5/) if you already haven't!
diff --git a/packages/dioxus-lib/Cargo.toml b/packages/dioxus-lib/Cargo.toml
index 6dcd58554..bf1b84757 100644
--- a/packages/dioxus-lib/Cargo.toml
+++ b/packages/dioxus-lib/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/learn/0.4/"
+homepage = "https://dioxuslabs.com/learn/0.5/"
keywords = ["dom", "ui", "gui", "react", "wasm"]
rust-version = "1.65.0"
diff --git a/packages/dioxus/Cargo.toml b/packages/dioxus/Cargo.toml
index 2e8c665ef..bc06cb07c 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/learn/0.4/"
+homepage = "https://dioxuslabs.com/learn/0.5/"
keywords = ["dom", "ui", "gui", "react", "wasm"]
rust-version = "1.65.0"
diff --git a/packages/extension/README.md b/packages/extension/README.md
index 4dc708c4c..c53fd88b1 100644
--- a/packages/extension/README.md
+++ b/packages/extension/README.md
@@ -32,7 +32,7 @@ This overview provides a brief introduction to Dioxus. For a more in-depth guide
- [Book (0.5)](https://dioxuslabs.com/learn/0.5)
## Contributing
-- Check out the website [section on contributing](https://dioxuslabs.com/learn/0.4/contributing).
+- Check out the website [section on contributing](https://dioxuslabs.com/learn/0.5/contributing).
- Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues).
- [Join](https://discord.gg/XgGxMSkvUM) the discord and ask questions!
diff --git a/packages/fullstack/README.md b/packages/fullstack/README.md
index 65f2732d1..3a547839e 100644
--- a/packages/fullstack/README.md
+++ b/packages/fullstack/README.md
@@ -65,7 +65,7 @@ async fn get_meaning(of: String) -> Result