Function sycamore::noderef::create_node_ref
source · [−]pub fn create_node_ref<G>(cx: BoundedScope<'_, '_>) -> &NodeRef<G>where
G: GenericNode,
Expand description
Create a new NodeRef
on the current Scope
.
The node ref does not point to anything until it is set, either by assigning it to a node in the
view or by explicitly calling NodeRef::set
.
Example
let node_ref: &NodeRef<G> = create_node_ref(cx);