From 858659078bc00299d521d6997950788e8ce232b2 Mon Sep 17 00:00:00 2001 From: siddtheone <45398971+siddtheone@users.noreply.github.com> Date: Thu, 27 Mar 2025 12:54:00 +0530 Subject: [PATCH] Update app.js Fixing dependency array --- R1_useContextReducer_useContextuseReducer/Finished/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R1_useContextReducer_useContextuseReducer/Finished/app.js b/R1_useContextReducer_useContextuseReducer/Finished/app.js index 90cd12a..fc84ff7 100644 --- a/R1_useContextReducer_useContextuseReducer/Finished/app.js +++ b/R1_useContextReducer_useContextuseReducer/Finished/app.js @@ -159,12 +159,12 @@ function CounterSummary() { const setVisibleTab1 = React.useCallback((event) => { tabDispatch({ type: 'change-tab', tab: 1 }) event.preventDefault(); - }); + }, []); const setVisibleTab2 = React.useCallback((event) => { tabDispatch({ type: 'change-tab', tab: 2 }) event.preventDefault(); - }); + }, []); return (
@@ -188,4 +188,4 @@ const CounterSummaryDetail = React.memo(function CounterSummaryDetail({ name, to return (

{name} ({total})

) -}); \ No newline at end of file +});