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 +});