DioxusLabs / dioxus

Fullstack app framework for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
20.47k stars 786 forks source link

Make EventHandler Copy #2100

Closed ealmloff closed 6 months ago

ealmloff commented 6 months ago

Feature Request

When using EventHandler in multiple events, you currently need to clone the eventhandler into one closure and move it into the other closure.

Implement Suggestion

We can make EventHandler Copy with a CopyValue. When creating the CopyValue, it should be owned by the child scope like we currently do when converting T to ReadOnlySignal<T> here