mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Removed some stale TODO comments
This commit is contained in:
1 parent
9cfa25bdcc
commit
bf2f13d32a
3 files changed
+2
-9
No files matched your search
@@ -829,8 +829,7 @@ export function attach(
|
||||
function getReactElementFromNative(hostInstance) {
|
||||
const fiber = renderer.findFiberByHostInstance(hostInstance);
|
||||
if (fiber != null) {
|
||||
// TODO: type fibers.
|
||||
const primaryFiber = getPrimaryFiber((fiber: any));
|
||||
const primaryFiber = getPrimaryFiber(((fiber: any): Fiber));
|
||||
return primaryFiber;
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -44,7 +44,7 @@ export default function SelectedElement(_: Props) {
|
||||
}
|
||||
}, [bridge, selectedElementID, store]);
|
||||
|
||||
// TODO Make "view DOM" and "view source" buttons work
|
||||
// TODO Make "view source" button work
|
||||
|
||||
if (element === null) {
|
||||
return (
|
||||
@@ -184,14 +184,10 @@ function useInspectedElement(id: number | null): InspectedElement | null {
|
||||
|
||||
const onInspectedElement = (inspectedElement: InspectedElement) => {
|
||||
if (inspectedElement && inspectedElement.id !== idRef.current) {
|
||||
// TODO Is this sufficient? Will this leak?
|
||||
// Ignore bridge updates about previously selected elements.
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO I think there's a bug here with stale state or a bad listener.
|
||||
// "Cannot read property 'inspectElement' of undefined"
|
||||
|
||||
if (inspectedElement !== null) {
|
||||
inspectedElement.context = hydrateHelper(inspectedElement.context);
|
||||
inspectedElement.hooks = hydrateHelper(inspectedElement.hooks);
|
||||
|
||||
@@ -45,8 +45,6 @@ export default function Tree(props: Props) {
|
||||
|
||||
// Navigate the tree with up/down arrow keys.
|
||||
useEffect(() => {
|
||||
// TODO Use selectNextElement / selectPreviousElement (with dispatch)
|
||||
|
||||
const handleKeyDown = event => {
|
||||
// eslint-disable-next-line default-case
|
||||
switch (event.key) {
|
||||
|
||||
Reference in new issue
Block a user