Open
Description
I need to create a reproducer, but I think there is a bug in the use_drop
when the ref is placed in a nested context:
#[function_component(Other)]
fn other(props: &ChildrenProps) -> Html {
html!(<div> { for props.children.iter() } </div>)
}
#[function_component(Example)]
fn example() -> Html {
let node = use_node_ref();
let drop = use_drop(node.clone());
html!(
<div ref={node}> // works when it's here
<Other>
<div ref={node}> // but not when it's here
</div>
</Other>
</div>
)
}
Through the browser's DOM inspector, I can see the events being attached when putting the ref
on the other one, but not when it's in the inner one.
<
4399
/div>
Metadata
Metadata
Assignees
Labels
No labels