mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 14:44:12 +00:00
docs: allow build core_reference/children example
It needs lifetime parameters.
This commit is contained in:
parent
ca0dd4aa71
commit
388acf3277
1 changed files with 2 additions and 2 deletions
|
@ -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!" }
|
||||
|
|
Loading…
Reference in a new issue