Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested component click event error #655

Closed
ys2rice2yangsong opened this issue Jan 11, 2024 · 1 comment
Closed

Nested component click event error #655

ys2rice2yangsong opened this issue Jan 11, 2024 · 1 comment

Comments

@ys2rice2yangsong
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

#[component(inline_props)]
fn T<G:Html>(cx:Scope,title: String, level: i32) -> View {
let tt = title.clone();
let tt_clone = title.clone();
view!{
cx,
(
if level<5 {
view!{
cx,
div{
T(
title="afasdf".to_string(),
level=level+1
)
}
}
} else {
view!{
cx,
p(
on:click=move|e| {
console!("asdfasdf".to_string());
}
){
(tt)
}
}
}
)
}
}

Expected behavior

Screenshots
error info:
Uncaught Error: closure invoked recursively or after being dropped

Environment

  • Sycamore: [e.g. 0.8.2, master]
  • Browser: [e.g. chrome, safari, if applicable]
  • OS: [e.g. Windows, if applicable]

Additional context
Add any other context about the problem here.

@lukechu10
Copy link
Member

Duplicate of #654 and #433

@lukechu10 lukechu10 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants