@embra/reactivity - v0.0.3
    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. In other words, no extra care is needed to use this in React components. All args will be updated properly.

    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 }
    );
    }