UNPKG

recoil

Version:

Recoil - A state management library for React

28 lines (23 loc) 741 B
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails oncall+recoil * @flow strict-local * @format */ 'use strict'; import type { TransactionInterface } from '../core/Recoil_AtomicUpdates'; const { atomicUpdater } = require('../core/Recoil_AtomicUpdates'); const { useStoreRef } = require('../core/Recoil_RecoilRoot.react'); const { useMemo } = require('react'); declare function useRecoilTransaction<Arguments: $ReadOnlyArray<mixed>>(fn: (TransactionInterface) => (...Arguments) => void, deps?: $ReadOnlyArray<mixed>): (...Arguments) => void; module.exports = useRecoilTransaction;