npm install @cronocode/recoil-utils
Or if you're using yarn:
yarn add @cronocode/recoil-utils
Or if you're using bower:
bower install --save @cronocode/recoil-utils
import { useRecoilCachedValue } from "@cronocode/recoil-utils";
const [stateValue, loading] = useRecoilCachedValue(
recoilSelector,
defaultValue
);
const [stateValue, loading] = useRecoilCachedValue(
recoilSelectorFamily(selectorKey),
defaultValue,
"UniqueKeyForAnySelectorKey"
);
Recoil is MIT licensed.