From aa15d00b1e18850ca17e38ae29add12d6a946d6b Mon Sep 17 00:00:00 2001
From: YuKun Liu <41265098+mrxiaozhuox@users.noreply.github.com>
Date: Thu, 13 Jan 2022 12:16:17 +0800
Subject: [PATCH 01/33] docs: add `zh-cn` readme
---
README.md | 8 ++
notes/README/ZH_CN.md | 165 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 173 insertions(+)
create mode 100644 notes/README/ZH_CN.md
diff --git a/README.md b/README.md
index 04d01dead..bb0ebcdc9 100644
--- a/README.md
+++ b/README.md
@@ -50,6 +50,14 @@
+
+
Dioxus is a portable, performant, and ergonomic framework for building cross-platform user interfaces in Rust.
diff --git a/notes/README/ZH_CN.md b/notes/README/ZH_CN.md
new file mode 100644
index 000000000..6e22092d5
--- /dev/null
+++ b/notes/README/ZH_CN.md
@@ -0,0 +1,165 @@
+
+
🌗🚀 Dioxus
+
+ Frontend that scales.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Dioxus 是一个可移植、高性能的框架,用于在 Rust 中建跨平台的用户界面。
+
+```rust
+fn app(cx: Scope) -> Element {
+ let mut count = use_state(&cx, || 0);
+
+ cx.render(rsx!(
+ h1 { "High-Five counter: {count}" }
+ button { onclick: move |_| count += 1, "Up high!" }
+ button { onclick: move |_| count -= 1, "Down low!" }
+ ))
+}
+```
+
+Dioxus 可用于制作 网页程序、桌面应用、静态站点、移动端应用。Dioxus 为不同的平台都提供了很好的开发文档。
+
+如果你会使用 React ,那 Dioxus 对你来说会很简单。
+
+### 项目特点:
+- 桌面程序在本地运行。
+- 强大的状态管理工具。
+- 支持所有 HTML 标签,监听器和事件。
+- 超高的内存使用率,稳定的组件分配器。
+- 多通道异步调动器,超强的异步支持。
+- 更多信息请查阅: [版本发布文档](https://dioxuslabs.com/blog/introducing-dioxus/).
+
+### 示例
+
+所有例子都是 桌面应用 程序,请使用 `cargo run --example XYZ` 运行这些例子。
+
+```
+cargo run --example EXAMPLE
+```
+
+## 开始学习
+
+
+
+
+## Dioxus 项目
+
+| 文件浏览器 (桌面应用) | WiFi 扫描器 (桌面应用) | Todo管理 (所有平台) | 商城系统 (SSR/liveview) |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [](https://github.com/DioxusLabs/example-projects/blob/master/file-explorer) | [](https://github.com/DioxusLabs/example-projects/blob/master/wifi-scanner) | [](https://github.com/DioxusLabs/example-projects/blob/master/todomvc) | [](https://github.com/DioxusLabs/example-projects/blob/master/ecommerce-site) |
+
+
+查看 [awesome-dioxus](https://github.com/DioxusLabs/awesome-dioxus) 查看更多有趣(~~NiuBi~~)的项目!
+
+## 为什么使用 Rust 开发
+
+TypeScript 是一个不错的 JavaScript 拓展集,但它仍然算是 JavaScript。
+
+TS 代码运行效率不高,而且有大量的配置项。
+
+相比之下,Dioxus 使用用 Rust 编写将大大的提高效能。
+
+使用 Rust 开发,我们能获得:
+
+- 所有库的静态类型支持。
+- 变量的默认不变性。
+- 一个简单且直观的模块管理系统。
+- 集成在内部的文档系统。
+- 先进的模式匹配系统。
+- 简洁、高效、可组合的迭代器。
+- 内联内置的 单元测试 / 集成测试。
+- 一流的异常处理系统。
+- 强大且健全的标准库。
+- 灵活的 `宏` 系统。
+- 使用 `crates.io` 管理包。
+
+Dioxus 能为开发者提供的:
+
+- 正确且安全的使用不可变数据结构。
+- 安全的错误处理结果。
+- 拥有原生移动端的性能。
+- 直接访问系统层IO。
+
+Dioxus 使 Rust 应用程序的编写速度和 React 应用程序一样快,但提供了更多的健壮性,让你的前端团队更有信心在更短的时间内做出重大改变。
+
+### 不建议使用 Dioxus 的情况?
+
+您不该在这些情况下使用 Dioxus :
+
+- 你不喜欢 React Hooks 的前端开发方案。
+- 你需要一个 `no-std` 的渲染器。
+- 您希望应用运行在 `不支持 Wasm 或 asm.js` 的浏览器。
+
+
+## 协议
+
+这个项目使用 [MIT 协议].
+
+[MIT 协议]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE
\ No newline at end of file
From 55b84fd9bdce08119a39de909192035e8ae9d73e Mon Sep 17 00:00:00 2001
From: YuKun Liu <41265098+mrxiaozhuox@users.noreply.github.com>
Date: Thu, 13 Jan 2022 12:30:05 +0800
Subject: [PATCH 02/33] docs: commit docs
---
README.md | 2 +-
notes/README/ZH_CN.md | 19 +++++++++++--------
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index bb0ebcdc9..588e1f873 100644
--- a/README.md
+++ b/README.md
@@ -116,7 +116,7 @@ cargo run --example EXAMPLE
| [](https://github.com/DioxusLabs/example-projects/blob/master/file-explorer) | [](https://github.com/DioxusLabs/example-projects/blob/master/wifi-scanner) | [](https://github.com/DioxusLabs/example-projects/blob/master/todomvc) | [](https://github.com/DioxusLabs/example-projects/blob/master/ecommerce-site) |
-See the awesome-dioxus page for a curated list of content in the Dioxus Ecosystem.
+See the [awesome-dioxus](https://github.com/DioxusLabs/awesome-dioxus) page for a curated list of content in the Dioxus Ecosystem.
## Why Dioxus and why Rust?
diff --git a/notes/README/ZH_CN.md b/notes/README/ZH_CN.md
index 6e22092d5..eaf364c80 100644
--- a/notes/README/ZH_CN.md
+++ b/notes/README/ZH_CN.md
@@ -75,7 +75,9 @@ fn app(cx: Scope) -> Element {
}
```
-Dioxus 可用于制作 网页程序、桌面应用、静态站点、移动端应用。Dioxus 为不同的平台都提供了很好的开发文档。
+Dioxus 可用于制作 网页程序、桌面应用、静态站点、移动端应用。
+
+Dioxus 为不同的平台都提供了很好的开发文档。
如果你会使用 React ,那 Dioxus 对你来说会很简单。
@@ -89,13 +91,13 @@ Dioxus 可用于制作 网页程序、桌面应用、静态站点、移动端应
### 示例
-所有例子都是 桌面应用 程序,请使用 `cargo run --example XYZ` 运行这些例子。
+本项目中的所有例子都是 `桌面应用` 程序,请使用 `cargo run --example XYZ` 运行这些例子。
```
cargo run --example EXAMPLE
```
-## 开始学习
+## 进入学习
@@ -118,7 +120,7 @@ cargo run --example EXAMPLE
查看 [awesome-dioxus](https://github.com/DioxusLabs/awesome-dioxus) 查看更多有趣(~~NiuBi~~)的项目!
-## 为什么使用 Rust 开发
+## 为什么使用 Dioxus 和 Rust ?
TypeScript 是一个不错的 JavaScript 拓展集,但它仍然算是 JavaScript。
@@ -128,7 +130,7 @@ TS 代码运行效率不高,而且有大量的配置项。
使用 Rust 开发,我们能获得:
-- 所有库的静态类型支持。
+- 库的静态类型支持。
- 变量的默认不变性。
- 一个简单且直观的模块管理系统。
- 集成在内部的文档系统。
@@ -145,7 +147,7 @@ Dioxus 能为开发者提供的:
- 正确且安全的使用不可变数据结构。
- 安全的错误处理结果。
- 拥有原生移动端的性能。
-- 直接访问系统层IO。
+- 直接访问系统的IO层。
Dioxus 使 Rust 应用程序的编写速度和 React 应用程序一样快,但提供了更多的健壮性,让你的前端团队更有信心在更短的时间内做出重大改变。
@@ -153,9 +155,10 @@ Dioxus 使 Rust 应用程序的编写速度和 React 应用程序一样快,但
您不该在这些情况下使用 Dioxus :
-- 你不喜欢 React Hooks 的前端开发方案。
-- 你需要一个 `no-std` 的渲染器。
+- 您不喜欢 React Hooks 的前端开发方案。
+- 您需要一个 `no-std` 的渲染器。
- 您希望应用运行在 `不支持 Wasm 或 asm.js` 的浏览器。
+- 您需要一个 `Send + Sync` UI 解决方案(目前不支持)。
## 协议
From 5d85eb643862e6ddd2b4cb7d3eb7e973750c3b89 Mon Sep 17 00:00:00 2001
From: YuKun Liu <41265098+mrxiaozhuox@users.noreply.github.com>
Date: Thu, 13 Jan 2022 18:16:55 +0800
Subject: [PATCH 03/33] fix: edit `git-repository-url`
---
docs/guide/book.toml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/guide/book.toml b/docs/guide/book.toml
index 48ead3936..eabbe6f2b 100644
--- a/docs/guide/book.toml
+++ b/docs/guide/book.toml
@@ -10,8 +10,8 @@ edition = "2018"
[output.html]
mathjax-support = true
site-url = "/mdBook/"
-git-repository-url = "https://github.com/rust-lang/mdBook/tree/master/guide"
-edit-url-template = "https://github.com/rust-lang/mdBook/edit/master/guide/{path}"
+git-repository-url = "https://github.com/DioxusLabs/dioxus/edit/master/docs/guide"
+edit-url-template = "https://github.com/DioxusLabs/dioxus/edit/master/docs/guide/{path}"
[output.html.playground]
editable = true
From 75032da885d3e8d568531783b0f3005072077aa6 Mon Sep 17 00:00:00 2001
From: YuKun Liu
Date: Thu, 13 Jan 2022 22:30:18 +0800
Subject: [PATCH 04/33] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 588e1f873..b7d167711 100644
--- a/README.md
+++ b/README.md
@@ -54,7 +54,7 @@