From 268e6d632d29ab7356011a6bd7024ef2f8e6854b Mon Sep 17 00:00:00 2001 From: Maximo Mussini Date: Thu, 28 Oct 2021 16:17:38 -0300 Subject: [PATCH] chore: clarify comment in hooks demo --- demo/src/Compat.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/demo/src/Compat.tsx b/demo/src/Compat.tsx index 08c92d3..1524f42 100644 --- a/demo/src/Compat.tsx +++ b/demo/src/Compat.tsx @@ -4,9 +4,13 @@ import React, { useMemo, useState } from "react"; export function ReactComponent() { const [v, set] = useState(0); - // NOTE: Test that babel-plugin-transform-hook-names can process this as well. + // NOTE: To check in devtools that babel-plugin-transform-hook-names can + // extract the variable names from typed expressions. const _unusedState = useState(0 as any); - const _unusedMemo = useMemo(() => _unusedState[0], [_unusedState[0]]); + const _unusedMemo: number = useMemo( + () => _unusedState[0], + [_unusedState[0]], + ); return (