@embra/reactivity - v0.0.7
    Preparing search index...

    Variable useDerivedConst

    useDerived: UseDerived = ...

    Derive a new Readable from the given ReadableLike.

    Note that changes to transform and config will not trigger re-derivation, and useDerive always uses the latest transform and config in the derivation.

    The ReadableLike to derive from, or a non-Readable value that will be returned as-is.

    Optional pure function that takes an input value and returns a new value.

    Optional custom Config.

    Transformed value from the given ReadableLike, or dep itself if dep is not a ReadableLike.

    import { useDerived } from "@embra/reactivity/react";

    function App({ position3d$ }) {
    const position2d = useDerived(
    position3d$,
    ({ x, y }) => ({ x, y }),
    { equal: (p1, p2) => p1.x === p2.x && p1.y === p2.y }
    );
    }