feat: amazingly awesome error handling

This commit is contained in:
Jonathan Kelley committed 2021-07-18 12:39:32 -04:00
1 parent 05c909f320
commit 4a72b3140b
58 files changed
+248 -1219

No files matched your search

+2 -2
View File
@@ -63,7 +63,7 @@ pub struct MyProps3<'a> {
// We need to manually specify a lifetime that ensures props and scope (the component's state) share the same lifetime.
// Using the `pub static Example: FC<()>` pattern _will_ specify a lifetime, but that lifetime will be static which might
// not exactly be what you want
fn Example3<'a>(cx: Context<'a, MyProps3<'a>>) -> VNode {
fn Example3<'a>(cx: Context<'a, MyProps3<'a>>) -> DomTree {
cx.render(rsx! {
div { "Not memoized! {cx.name}" }
})
@@ -77,7 +77,7 @@ pub struct MyProps4<'a> {
}
// We need to manually specify a lifetime that ensures props and scope (the component's state) share the same lifetime.
fn Example4<'a>(cx: Context<'a, MyProps4<'a>>) -> VNode {
fn Example4<'a>(cx: Context<'a, MyProps4<'a>>) -> DomTree {
cx.render(rsx! {
div { "Not memoized!", onclick: move |_| (cx.onhandle)() }
})