mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
Fix code listing in tutorial/index.mdx (#2836)
* Fix code listing in tutorial/index.mdx Sync with line 358 * update latest tutorial Changes here should be enough Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
This commit is contained in:
parent
868b2c235a
commit
81be10870a
@ -361,7 +361,7 @@ parent when a video is selected, which is done via a `Callback`. This concept is
|
||||
We modify its props to take an `on_click` callback:
|
||||
|
||||
```rust ,ignore {4}
|
||||
#[derive(Clone, Properties, PartialEq)]
|
||||
#[derive(Properties, PartialEq)]
|
||||
struct VideosListProps {
|
||||
videos: Vec<Video>,
|
||||
+ on_click: Callback<Video>
|
||||
@ -399,7 +399,7 @@ a new component, `VideoDetails`, component that is displayed when a video is cli
|
||||
use website_test::tutorial::Video;
|
||||
use yew::prelude::*;
|
||||
|
||||
#[derive(Clone, Properties, PartialEq)]
|
||||
#[derive(Properties, PartialEq)]
|
||||
struct VideosDetailsProps {
|
||||
video: Video,
|
||||
}
|
||||
|
||||
@ -287,7 +287,7 @@ struct Video {
|
||||
url: String,
|
||||
}
|
||||
|
||||
#[derive(Properties, PartialEq)]
|
||||
#[derive(Clone, Properties, PartialEq)]
|
||||
struct VideosListProps {
|
||||
videos: Vec<Video>,
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user