Bläddra i källkod

Refactor: move Component docs into the `components` directory to reflect how they are presented in the guide

Reinis Mazeiks 3 år sedan
förälder
incheckning
02d8e66f40

+ 5 - 5
docs/guide/src/SUMMARY.md

@@ -9,11 +9,11 @@
   - [Conditional Rendering](elements/conditional_rendering.md)
   - [Conditional Rendering](elements/conditional_rendering.md)
   - [Lists](elements/lists.md)
   - [Lists](elements/lists.md)
   - [Special Attributes](elements/special_attributes.md)
   - [Special Attributes](elements/special_attributes.md)
-- [Components](elements/components.md)
-  - [Properties](elements/propsmacro.md)
-  - [Reusing, Importing, and Exporting](elements/exporting_components.md)
-  - [Children and Attributes](elements/component_children.md)
-  - [How Data Flows](elements/composing.md)
+- [Components](components/index.md)
+  - [Properties](components/propsmacro.md)
+  - [Reusing, Importing, and Exporting](components/exporting_components.md)
+  - [Children and Attributes](components/component_children.md)
+  - [How Data Flows](components/composing.md)
 - [Thinking Reactively]()
 - [Thinking Reactively]()
   - [Thinking Reactively]()
   - [Thinking Reactively]()
   - [Thinking Reactively]()
   - [Thinking Reactively]()

+ 0 - 0
docs/guide/src/elements/component_children.md → docs/guide/src/components/component_children.md


+ 0 - 0
docs/guide/src/elements/composing.md → docs/guide/src/components/composing.md


+ 0 - 0
docs/guide/src/elements/exporting_components.md → docs/guide/src/components/exporting_components.md


+ 0 - 0
docs/guide/src/elements/components.md → docs/guide/src/components/index.md


+ 0 - 0
docs/guide/src/elements/propsmacro.md → docs/guide/src/components/propsmacro.md


+ 1 - 1
docs/guide/src/elements/lists.md

@@ -130,7 +130,7 @@ Remember: keys let Dioxus uniquely identify an item among its siblings. A well-c
 
 
 You might be tempted to use an item's index in the array as its key. In fact, that’s what Dioxus will use if you don’t specify a key at all. This is only acceptable if you can guarantee that the list is constant – i.e., no re-ordering, additions or deletions. In all other cases, do not use the index for the key – it will lead to the performance problems described above.
 You might be tempted to use an item's index in the array as its key. In fact, that’s what Dioxus will use if you don’t specify a key at all. This is only acceptable if you can guarantee that the list is constant – i.e., no re-ordering, additions or deletions. In all other cases, do not use the index for the key – it will lead to the performance problems described above.
 
 
-Note that if you pass the key to a [custom component](./components.md) you've made, it won't receive the key as a prop. It’s only used as a hint by Dioxus itself. If your component needs an ID, you have to pass it as a separate prop:
+Note that if you pass the key to a [custom component](../components/index.md) you've made, it won't receive the key as a prop. It’s only used as a hint by Dioxus itself. If your component needs an ID, you have to pass it as a separate prop:
 ```rust
 ```rust
 Post { key: "{key}", id: "{key}" }
 Post { key: "{key}", id: "{key}" }
 ```
 ```