Skip to content

Commit c00db84

Browse files
authored
Merge pull request #482 from rywng/patch-1
Update components.md
2 parents 0843b25 + 3df4aa4 commit c00db84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs-src/0.6/src/reference/components.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
Just like you wouldn't want to write a complex program in a single, long, `main` function, you shouldn't build a complex UI in a single `App` function. Instead, you should break down the functionality of an app in logical parts called components.
44

5-
A component is a Rust function, named in UpperCamelCase, that either takes no parameters or a properties struct and returns an `Element` describing the UI it wants to render.
5+
A component is a Rust function, named in [UpperCamelCase](https://en.wikipedia.org/wiki/Camel_case), that either takes no parameters or a properties struct and returns an `Element` describing the UI it wants to render.
66

77
```rust, no_run
88
{{#include src/doc_examples/hello_world_desktop.rs:component}}
99
```
1010

11-
> You'll probably want to add `#![allow(non_snake_case)]` to the top of your crate to avoid warnings about UpperCamelCase component names
11+
> You'll probably want to add `#![allow(non_snake_case)]` to the top of your crate to avoid warnings about `UpperCamelCase` component names
1212
1313
A Component is responsible for some rendering task – typically, rendering an isolated part of the user interface. For example, you could have an `About` component that renders a short description of Dioxus Labs:
1414

0 commit comments

Comments
 (0)