create_selector_with

Function create_selector_with 

Source
pub fn create_selector_with<F, Out, C>(
    derived: F,
    comparator: C,
) -> StateHandle<Out>
where F: Fn() -> Out + 'static, Out: 'static, C: Fn(&Out, &Out) -> bool + 'static,
Expand description

Creates a memoized value from some signals. Also know as “derived stores”. 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.