import { useEffect, useLayoutEffect } from 'react'; import { Facet, Cleanup, ExtractFacetValues } from '../types'; export declare const createUseFacetEffect: (useHook: typeof useEffect | typeof useLayoutEffect) => [], T extends [...Y]>(effect: (...args: ExtractFacetValues) => void | Cleanup, dependencies: unknown[], facets: T) => void; /** * Allows running an effect based on facet updates. Similar to React's useEffect. * * @param effect function that will do the side-effect (ex: update the DOM) * @param dependencies variable used by the map that are available in scope (similar as dependencies of useEffect) * @param facets facets that the effect listens to * * We pass the dependencies of the callback as the second argument so we can leverage the eslint-plugin-react-hooks option for additionalHooks. * Having this as the second argument allows the linter to work. */ export declare const useFacetEffect: [], T extends [...Y]>(effect: (...args: ExtractFacetValues) => void | Cleanup, dependencies: unknown[], facets: T) => void;