log2trace-ui - v1.0.0-rc.9
    Preparing search index...

    Interface Selector<T>

    A cached derivation of the store state. Create it with defineSelector.

    interface Selector<T> {
        compute: (state: TraceState, previous: T | undefined) => T;
        deps: number;
        id: string;
    }

    Type Parameters

    • T
    Index

    Properties

    Properties

    compute: (state: TraceState, previous: T | undefined) => T

    Compute the value from the state. previous is the last result, so an incremental selector can update it, or return it unchanged to keep its identity.

    deps: number

    OR of the Slice bits the result depends on; changes to other slices never recompute it.

    id: string

    Name for debugging.