Function sycamore::reactive::create_selector_with
source · [−]pub fn create_selector_with<'a, U>(
cx: BoundedScope<'a, 'a>,
f: impl FnMut() -> U + 'a,
eq_f: impl Fn(&U, &U) -> bool + 'a
) -> &'a ReadSignal<U>where
U: 'a,
Expand description
Creates a memoized value from some signals.
Unlike create_memo
, this function will not notify dependents of a
change if the output is the same.
It takes a comparison function to compare the old and new value, which returns true
if
they are the same and false
otherwise.
To use the type’s PartialEq
implementation instead of a custom function, use
create_selector
.