Add explicit React useState annotations in xplat/js

Reviewed By: SamChou19815

Differential Revision: D39756144

fbshipit-source-id: d34c86b62e82e771723714fb7896058b7f27670f
This commit is contained in:
Pieter Vanderwerff authored and Facebook GitHub Bot committed 2022-09-23 15:18:54 -07:00
1 parent c557f25648
commit ff14ff3d92
3 files changed
+37 -24

No files matched your search

+9 -6
View File
@@ -8,16 +8,17 @@
* @flow
*/
import ElementBox from './ElementBox';
import * as React from 'react';
import type {PressEvent} from '../Types/CoreEventTypes';
import type {HostRef} from './getInspectorDataForViewAtPoint';
import View from '../Components/View/View';
import StyleSheet from '../StyleSheet/StyleSheet';
import Dimensions from '../Utilities/Dimensions';
const getInspectorDataForViewAtPoint = require('./getInspectorDataForViewAtPoint');
const {findNodeHandle} = require('../ReactNative/RendererProxy');
import ElementBox from './ElementBox';
import * as React from 'react';
import type {HostRef} from './getInspectorDataForViewAtPoint';
const {findNodeHandle} = require('../ReactNative/RendererProxy');
const getInspectorDataForViewAtPoint = require('./getInspectorDataForViewAtPoint');
const {useEffect, useState, useCallback, useRef} = React;
@@ -28,7 +29,9 @@ export default function DevtoolsOverlay({
}: {
inspectedView: ?HostRef,
}): React.Node {
const [inspected, setInspected] = useState(null);
const [inspected, setInspected] = useState<null | {
frame: {height: any, left: any, top: any, width: any},
}>(null);
const [isInspecting, setIsInspecting] = useState(false);
const devToolsAgentRef = useRef(null);