Merge pull request #73 from autarch/typo-fixes

Fixes a few typos in the guide and docs
This commit is contained in:
Jonathan Kelley 2022-01-06 13:35:35 -05:00 committed by GitHub
commit 2b23ed825d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -61,7 +61,7 @@ We can even match against values:
fn App(cx: Scope)-> Element {
match get_name() {
"jack" => cx.render(rsx!( "Hey Jack, how's Diane?" )),
"diane" => cx.render(rsx!( "Hey Diana, how's Jack?" )),
"diane" => cx.render(rsx!( "Hey Diane, how's Jack?" )),
name => cx.render(rsx!( "Hello, {name}!" )),
}
}

View file

@ -74,7 +74,7 @@ struct PostListProps<'a> {
Next, we're going to define our component:
```rust
fn App(cx: Scope<PostList?) -> Element {
fn App(cx: Scope<PostList>) -> Element {
// First, we create a new iterator by mapping the post array
let posts = cx.props.posts.iter().map(|post| rsx!{
Post {

View file

@ -26,7 +26,7 @@ pub fn derive_typed_builder(input: proc_macro::TokenStream) -> proc_macro::Token
}
}
/// The html! macro makes it easy for developers to write jsx-style markup in their components.
/// The rsx! macro makes it easy for developers to write jsx-style markup in their components.
///
/// ## Complete Reference Guide:
/// ```