UNPKG

recoil

Version:

Recoil - A state management library for React

51 lines (45 loc) 1.06 kB
/** * 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'; const { Snapshot } = require('../../core/Recoil_Snapshot'); const { useGotoRecoilSnapshot, useRecoilSnapshot } = require('../../hooks/Recoil_Hooks'); const React = require('react'); const { useEffect, useRef } = require('react'); type Props = $ReadOnly<{ name?: string, persistenceLimit?: number, initialSnapshot?: ?Snapshot, devMode?: ?boolean, maxDepth?: number, maxItems?: number, }>; type ConnectProps = $ReadOnly<{ ...Props, goToSnapshot: (Snapshot) => void, }>; declare function connect(props: ConnectProps): ?{ track: (transactionId: number, snapshot: Snapshot) => void, disconnect: () => void, }; let CONNECTION_INDEX = 0; /** * @explorer-desc * Recoil Dev Tools Connector */ declare function Connector(arg0: Props): React.Node; module.exports = Connector;