Skip to content

Commit 8b75c81

Browse files
authored
Merge pull request #119 from yuniruyuni/docs/add-lifetime-for-children-example
2 parents ca0dd4a + 388acf3 commit 8b75c81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/core_reference/children.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ fn Example(cx: Scope) -> Element {
3232
}
3333

3434
#[derive(Props)]
35-
struct BannerProps {
35+
struct BannerProps<'a> {
3636
children: Element<'a>,
3737
}
3838

39-
fn Banner(cx: Scope) -> Element {
39+
fn Banner<'a>(cx: Scope<'a, BannerProps<'a>>) -> Element<'a> {
4040
cx.render(rsx! {
4141
div {
4242
h1 { "This is a great banner!" }

0 commit comments

Comments
 (0)