useSetResponseStale
#
DescriptionSet service to stale once rendered.
This way it will refetch it when unmounting and remounting it again.
#
Usageimport { useRecoilValue } from 'recoil';import { useSetResponseStale } from '@springtree/eva-suite-react-hooks';import { serviceState } from 'src/store/example-service';
const Example = () => { const serviceResponse = useRecoilValue(serviceState.response);
useSetResponseStale(serviceState.stale);
return (/* display service response... */);};
export default Example;