diff --git a/website/docs/concepts/agents.mdx b/website/docs/concepts/agents.mdx
index dc35203fa43..2b59ee47bcb 100644
--- a/website/docs/concepts/agents.mdx
+++ b/website/docs/concepts/agents.mdx
@@ -55,7 +55,7 @@ A dispatcher allows uni-directional communication between a component and an age
## Overhead
Agents use web workers \(i.e. Private and Public\). They incur a serialization overhead on the
-messages they send and receive. Agents use [bincode](https://github.com/servo/bincode) to communicate
+messages they send and receive. Agents use [bincode](https://github.com/bincode-org/bincode) to communicate
with other threads, so the cost is substantially higher than just calling a function.
## Further reading
diff --git a/website/docs/concepts/function-components/properties.mdx b/website/docs/concepts/function-components/properties.mdx
index 2927004e87f..02c3f469b56 100644
--- a/website/docs/concepts/function-components/properties.mdx
+++ b/website/docs/concepts/function-components/properties.mdx
@@ -78,11 +78,6 @@ fn App() -> Html {
```rust
use yew::{function_component, html, Html};
-
-
-
-
-
#[function_component]
fn HelloWorld() -> Html {
html! { "Hello world" }
diff --git a/website/docs/concepts/html/events.mdx b/website/docs/concepts/html/events.mdx
index 23c0532d75d..5ec6c64ab6b 100644
--- a/website/docs/concepts/html/events.mdx
+++ b/website/docs/concepts/html/events.mdx
@@ -107,7 +107,7 @@ pub enum Msg {
### Using `JsCast`
The [`wasm-bindgen`](https://rustwasm.github.io/wasm-bindgen/api/wasm_bindgen/index.html) crate has
-a useful trait; [`JsCast`](https://rustwasm.github.io/wasm-bindgen/api/wasm_bindgen/trait.JsCast.html)
+a useful trait: [`JsCast`](https://rustwasm.github.io/wasm-bindgen/api/wasm_bindgen/trait.JsCast.html),
which allows us to hop and skip our way to the type we want, as long as it implements `JsCast`. We can
do this cautiously, which involves some runtime checks and failure types like `Option` and `Result`,
or we can do it dangerously.
diff --git a/website/docs/concepts/html/lists.mdx b/website/docs/concepts/html/lists.mdx
index 6dca5da6c48..0795f9aff8b 100644
--- a/website/docs/concepts/html/lists.mdx
+++ b/website/docs/concepts/html/lists.mdx
@@ -83,7 +83,7 @@ html! {
We have [Keyed list](https://github.com/yewstack/yew/tree/master/examples/keyed_list) example that lets you test the performance improvements, but here is a rough rundown:
-1. Go to [Keyed list](https://github.com/yewstack/yew/tree/master/examples/keyed_list) hosted demo
+1. Go to [Keyed list hosted demo](https://examples.yew.rs/keyed_list)
2. Add 500 elements.
3. Disable keys.
4. Reverse the list.
diff --git a/website/docs/concepts/router.mdx b/website/docs/concepts/router.mdx
index 75613394c12..17c404f4157 100644
--- a/website/docs/concepts/router.mdx
+++ b/website/docs/concepts/router.mdx
@@ -190,7 +190,7 @@ routes. Except you supply a `to` attribute instead of a `href`. An example usage
Struct variants work as expected too:
```rust ,ignore
- to={Route::Post { id: "new-yew-release".to_string() }}>{ "Yew v0.19 out now!" }>
+ to={Route::Post { id: "new-yew-release".to_string() }}>{ "Yew!" }>
```
#### Navigator API
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json
index 5f3e467d264..3c794267f95 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json
@@ -12,11 +12,11 @@
"description": "The label for category Concepts in sidebar docs"
},
"sidebar.docs.category.Concepts.link.generated-index.title": {
- "message": "Yew concepts",
+ "message": "Yew 核心概念",
"description": "The generated-index page title for category Concepts in sidebar docs"
},
"sidebar.docs.category.Concepts.link.generated-index.description": {
- "message": "Learn about the important Yew concepts!",
+ "message": "了解 Yew 的重要概念!",
"description": "The generated-index page description for category Concepts in sidebar docs"
},
"sidebar.docs.category.HTML": {
@@ -24,7 +24,7 @@
"description": "The label for category HTML in sidebar docs"
},
"sidebar.docs.category.Components": {
- "message": "Function Components",
+ "message": "函数式组件",
"description": "The label for category Components in sidebar docs"
},
"sidebar.docs.category.Advanced topics": {
@@ -36,7 +36,7 @@
"description": "The generated-index page title for category Advanced topics in sidebar docs"
},
"sidebar.docs.category.Advanced topics.link.generated-index.description": {
- "message": "Learn about the advanced topics and inner workings of Yew!",
+ "message": "了解 Yew 的更多内部细节!",
"description": "The generated-index page description for category Advanced topics in sidebar docs"
},
"sidebar.docs.category.More": {
@@ -44,11 +44,11 @@
"description": "The label for category More in sidebar docs"
},
"sidebar.docs.category.More.link.generated-index.title": {
- "message": "Miscellaneous",
+ "message": "杂项",
"description": "The generated-index page title for category More in sidebar docs"
},
"sidebar.docs.category.Migration guides": {
- "message": "Migration guides",
+ "message": "迁移指南",
"description": "The label for category Migration guides in sidebar docs"
},
"sidebar.docs.category.yew": {
@@ -64,23 +64,23 @@
"description": "The label for category yew-router in sidebar docs"
},
"sidebar.docs.category.Using Basic Web Technologies In Yew": {
- "message": "Intro With Basic Web Technologies",
+ "message": "Yew 中的基本 Web 技术",
"description": "The label for category Using Basic Web Technologies In Yew in sidebar docs"
},
"sidebar.docs.category.Using Basic Web Technologies In Yew.link.generated-index.title": {
- "message": "Yew Take on Basic Web Technologies",
+ "message": "Yew 对基本 Web 技术的看法",
"description": "The generated-index page title for category Using Basic Web Technologies In Yew in sidebar docs"
},
"sidebar.docs.category.Using Basic Web Technologies In Yew.link.generated-index.description": {
- "message": "Yew mostly operates on the idea of keeping everything that a reusable piece of UI may need, in one place - rust files. But also seeks to stay close to the original look of the technology. Explore further to fully grasp what we mean by these statements:",
+ "message": "Yew 主要基于将可重用的 UI 部件所需的所有内容放在一个地方 - rust 文件的想法。但也力求保持与技术的原始外观接近。进一步探索,以充分理解我们对这些陈述的含义:",
"description": "The generated-index page description for category Using Basic Web Technologies In Yew in sidebar docs"
},
"sidebar.docs.category.Hooks": {
- "message": "Hooks",
+ "message": "钩子",
"description": "The label for category Hooks in sidebar docs"
},
"sidebar.docs.category.Struct Components": {
- "message": "Struct Components",
+ "message": "结构化组件",
"description": "The label for category Struct Components in sidebar docs"
}
-}
+}
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/advanced-topics/children.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/advanced-topics/children.mdx
new file mode 100644
index 00000000000..bed0a5f8ce2
--- /dev/null
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/advanced-topics/children.mdx
@@ -0,0 +1,308 @@
+---
+title: '子组件'
+---
+
+:::caution
+
+检查和操作 `Children` 往往会导致应用程序中令人惊讶且难以解释的行为。这可能导致边缘情况,并且通常不会产生预期的结果。如果您尝试操作 `Children`,则应考虑其他方法。
+
+Yew 支持将 `Html` 用作子组件属性的类型。如果您不需要 `Children` 或 `ChildrenRenderer`,则应使用 `Html` 作为子组件。它没有 `Children` 的缺点,并且性能开销较低。
+
+:::
+
+## 通用用法
+
+_大多数情况下,_当允许组件具有子组件时,您不关心组件具有的子组件的类型。在这种情况下,下面的示例就足够了。
+
+```rust
+use yew::{html, Component, Context, Html, Properties};
+
+#[derive(Properties, PartialEq)]
+pub struct ListProps {
+ #[prop_or_default]
+ pub children: Html,
+}
+
+pub struct List;
+
+impl Component for List {
+ type Message = ();
+ type Properties = ListProps;
+
+ fn create(_ctx: &Context) -> Self {
+ Self
+ }
+
+ fn view(&self, ctx: &Context) -> Html {
+ html! {
+