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

    Variable useDeriveConst

    useDerive: UseDerive = ...

    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 { useDerive, useValue } from "@embra/reactivity/react";

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