docs: buff up the theory of react

This commit is contained in:
Jonathan Kelley committed 2022-01-28 02:44:13 -05:00
1 parent 0592cdb135
commit 4fb2221ee1
12 files changed
+263 -45

No files matched your search

+1 -1
View File
@@ -106,7 +106,7 @@ fn Post(cx: Scope<PostProps>) -> Element {
}
```
When declaring a component in `rsx!`, we can pass in properties using the traditional Rust struct syntax. Dioxus will automatically call "into" on the property fields, cloning when necessary. Our `Post` component is simply a collection of smaller components wrapped together in a single container.
When declaring a component in `rsx!`, we can pass in properties using the traditional Rust struct syntax. Our `Post` component is simply a collection of smaller components wrapped together in a single container.
Let's take a look at the `VoteButton` component. For now, we won't include any interactivity - just the rendering the score and buttons to the screen.