feat: events work again!

This commit is contained in:
Jonathan Kelley committed 2021-06-23 01:44:48 -04:00
1 parent 73047fe956
commit 9d7ee79826
18 files changed
+621 -222

No files matched your search

+2 -5
View File
@@ -16,7 +16,7 @@ impl DebugRenderer {
///
/// This means that the root component must either consumes its own context, or statics are used to generate the page.
/// The root component can access things like routing in its context.
pub fn new(root: impl for<'a> Fn(Context<'a, ()>) -> VNode + 'static) -> Self {
pub fn new(root: FC<()>) -> Self {
Self::new_with_props(root, ())
}
@@ -24,10 +24,7 @@ impl DebugRenderer {
/// Automatically progresses the creation of the VNode tree to completion.
///
/// A VDom is automatically created. If you want more granular control of the VDom, use `from_vdom`
pub fn new_with_props<T: Properties + 'static>(
root: impl for<'a> Fn(Context<'a, T>) -> VNode + 'static,
root_props: T,
) -> Self {
pub fn new_with_props<T: Properties + 'static>(root: FC<T>, root_props: T) -> Self {
Self::from_vdom(VirtualDom::new_with_props(root, root_props))
}