feat: beaf up the use_state hook
This commit is contained in:
1 parent
7aec40d57e
commit
e4cdb645aa
11 files changed
+214
-218
No files matched your search
@@ -549,13 +549,8 @@ impl<'a> IntoVNode<'a> for VNode<'a> {
|
||||
}
|
||||
|
||||
impl<'a> IntoVNode<'a> for &VNode<'a> {
|
||||
fn into_vnode(self, cx: NodeFactory<'a>) -> VNode<'a>
|
||||
// where
|
||||
// 'a: 'c,
|
||||
{
|
||||
todo!()
|
||||
// cloning is cheap since vnodes are just references into bump arenas
|
||||
// self.clone()
|
||||
fn into_vnode(self, cx: NodeFactory<'a>) -> VNode<'a> {
|
||||
self.clone()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -563,14 +558,6 @@ pub trait IntoVNode<'a> {
|
||||
fn into_vnode(self, cx: NodeFactory<'a>) -> VNode<'a>;
|
||||
}
|
||||
|
||||
// pub trait VNodeBuilder<'a, G>: IntoIterator<Item = G>
|
||||
// where
|
||||
// G: IntoVNode<'a>,
|
||||
// {
|
||||
// }
|
||||
|
||||
// impl<'a, F> VNodeBuilder<'a, LazyNodes<F>> for LazyNodes<F> where F: FnOnce(NodeFactory) -> VNode {}
|
||||
|
||||
// Wrap the the node-builder closure in a concrete type.
|
||||
// ---
|
||||
// This is a bit of a hack to implement the IntoVNode trait for closure types.
|
||||
|
||||
Reference in new issue
Block a user