Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Commit

Permalink
Fix flow erros in OSS repo
Browse files Browse the repository at this point in the history
Summary:
Removing dependency of internal package `useEffectOnce`.
Require modules using relative paths.

Reviewed By: drarmstr

Differential Revision: D24641110

fbshipit-source-id: 0b728813ef7beca014d040320da3c6bf4bc5c8cd
  • Loading branch information
Maximiliano Benedetto authored and facebook-github-bot committed Oct 30, 2020
1 parent 2e9c0c5 commit baf0f1a
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/contrib/devtools_connector/RecoilDevTools_Connector.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@

'use strict';

const React = require('React');

const {useEffect, useRef} = require('react');
const {Snapshot} = require('recoil-oss/core/Recoil_Snapshot');
const {Snapshot} = require('../../core/Recoil_Snapshot');
const {
useGotoRecoilSnapshot,
useRecoilSnapshot,
} = require('recoil-oss/hooks/Recoil_Hooks');
const useEffectOnce = require('useEffectOnce');
} = require('../../hooks/Recoil_Hooks');
const React = require('react');
const {useEffect, useRef} = require('react');

type Props = $ReadOnly<{
name?: string,
Expand Down Expand Up @@ -66,7 +64,7 @@ function Connector({
const goToSnapshot = useGotoRecoilSnapshot();
const snapshot = useRecoilSnapshot();

useEffectOnce(() => {
useEffect(() => {
connectionRef.current = connect({
name,
persistenceLimit,
Expand All @@ -78,7 +76,7 @@ function Connector({
});

return connectionRef.current?.disconnect;
});
}, []);

useEffect(() => {
const transactionID = transactionIdRef.current++;
Expand Down

0 comments on commit baf0f1a

Please sign in to comment.