You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All events are currently sent to html! macro by cloning them. This is very inefficient and bad code.
Proposal
Swap all event callbacks from Option<yew::Callback<T>> to yew::Callback<T>, as the default (using #[prop_or_default]) does basically the same anyways (not setting an event on the element). This further allows passing by reference, ie onclick={&props.onclick}.
Other relevant information
No response
The text was updated successfully, but these errors were encountered:
Description
All events are currently sent to
html!
macro by cloning them. This is very inefficient and bad code.Proposal
Swap all event callbacks from
Option<yew::Callback<T>>
toyew::Callback<T>
, as the default (using#[prop_or_default]
) does basically the same anyways (not setting an event on the element). This further allows passing by reference, ieonclick={&props.onclick}
.Other relevant information
No response
The text was updated successfully, but these errors were encountered: