Function dioxus_hooks::use_callback

source ·
pub fn use_callback<O>(f: impl FnMut() -> O + 'static) -> UseCallback<O>
Expand description

A callback that’s always current

Whenever this hook is called the inner callback will be replaced with the new callback but the handle will remain.

There is currently no signal tracking on the Callback so anything reading from it will not be updated.

This API is in flux and might not remain.