@samitouri / QOS-React / commits / bf2f13d32a

Removed some stale TODO comments

Brian Vaughn committed Feb 14, 2019 at 13:37 UTC bf2f13d32a5c143aba1874995338c4c7d24bf442
3 files changed +2 -9
src/backend/renderer.js
+1 -2
@@ -829,8 +829,7 @@ export function attach(
829 function getReactElementFromNative(hostInstance) {
830 const fiber = renderer.findFiberByHostInstance(hostInstance);
831 if (fiber != null) {
832 - // TODO: type fibers.
833 - const primaryFiber = getPrimaryFiber((fiber: any));
832 + const primaryFiber = getPrimaryFiber(((fiber: any): Fiber));
833 return primaryFiber;
834 }
835 return null;
src/devtools/views/SelectedElement.js
+1 -5
@@ -44,7 +44,7 @@ export default function SelectedElement(_: Props) {
44 }
45 }, [bridge, selectedElementID, store]);
46
47 - // TODO Make "view DOM" and "view source" buttons work
47 + // TODO Make "view source" button work
48
49 if (element === null) {
50 return (
@@ -184,14 +184,10 @@ function useInspectedElement(id: number | null): InspectedElement | null {
184
185 const onInspectedElement = (inspectedElement: InspectedElement) => {
186 if (inspectedElement && inspectedElement.id !== idRef.current) {
187 - // TODO Is this sufficient? Will this leak?
187 // Ignore bridge updates about previously selected elements.
188 return;
189 }
190
192 - // TODO I think there's a bug here with stale state or a bad listener.
193 - // "Cannot read property 'inspectElement' of undefined"
194 -
191 if (inspectedElement !== null) {
192 inspectedElement.context = hydrateHelper(inspectedElement.context);
193 inspectedElement.hooks = hydrateHelper(inspectedElement.hooks);
src/devtools/views/Tree.js
-2
@@ -45,8 +45,6 @@ export default function Tree(props: Props) {
45
46 // Navigate the tree with up/down arrow keys.
47 useEffect(() => {
48 - // TODO Use selectNextElement / selectPreviousElement (with dispatch)
49 -
48 const handleKeyDown = event => {
49 // eslint-disable-next-line default-case
50 switch (event.key) {