Merge pull request #119 from yuniruyuni/docs/add-lifetime-for-children-example

This commit is contained in:
Jonathan Kelley authored and GitHub committed 2022-01-11 14:36:28 -05:00
commit 8b75c811a2
1 file changed
+2 -2
+2 -2
View File
@@ -32,11 +32,11 @@ fn Example(cx: Scope) -> Element {
}
#[derive(Props)]
struct BannerProps {
struct BannerProps<'a> {
children: Element<'a>,
}
fn Banner(cx: Scope) -> Element {
fn Banner<'a>(cx: Scope<'a, BannerProps<'a>>) -> Element<'a> {
cx.render(rsx! {
div {
h1 { "This is a great banner!" }