@daily-co/daily-react
Version:
Daily React makes it easier to integrate [@daily-co/daily-js](https://www.npmjs.com/package/@daily-co/daily-js) in React applications.
25 lines (24 loc) • 1.03 kB
TypeScript
import { Getter, WritableAtom } from 'jotai';
export declare function jotaiDebugLabel(label: string): string;
interface EqualAtomOptions<T> {
key?: string;
get: () => T;
equals: (a: T, b: T) => boolean;
}
/**
* Same API as Recoil's selector but with an additional `equals` key.
* Allows to run custom equality checks before returning a new calculated value.
* Use this when returning non-primitive types from state.
*/
export declare function equalAtom<T>(options: EqualAtomOptions<T>): import("jotai/esm/").Atom<T>;
/**
* A custom implementation of `equalAtomFamily` for Jotai,
* providing similar functionality to Recoil's `selectorFamily`
* with an additional `equals` key for custom equality checks.
*/
interface EqualAtomFamilyOptions<T, P> {
get: (param: P) => (get: Getter) => T;
equals: (a: T, b: T) => boolean;
}
export declare function equalAtomFamily<T extends unknown[], P>(options: EqualAtomFamilyOptions<T, P>): (param: P) => WritableAtom<T, T, void>;
export {};