tss-react-v18-peer-testing
Version:
makeStyles is dead, long live makeStyles!
20 lines (19 loc) • 580 B
TypeScript
/**
* useEffect(
* ()=> { ... },
* [ { "foo": "bar" } ]
* )
* => The callback will be invoked every render.
* because { "foo": "bar" } is a new instance every render.
*
* useEffect(
* ()=> { ... },
* [ getDependencyArrayRef({ "foo": "bar" }) ]
* );
* => The callback will only be invoked once.
*
* The optimization will be enabled only if obj is
* of the form Record<string, string | number | undefined | null>
* overwise the object is returned (the function is the identity function).
*/
export declare function getDependencyArrayRef(obj: any): any;