sycamore::reactive

Function create_selector_with

pub fn create_selector_with<T>(
    f: impl FnMut() -> T + 'static,
    eq: impl FnMut(&T, &T) -> bool + 'static,
) -> ReadSignal<T>
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.