Removed some stale TODO comments

This commit is contained in:
Brian Vaughn committed 2019-02-14 13:37:40 -08:00
1 parent 9cfa25bdcc
commit bf2f13d32a
3 files changed
+2 -9

No files matched your search

+1 -2
View File
@@ -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;
+1 -5
View File
@@ -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);
-2
View File
@@ -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) {