From c01de6d16191986c68233f8efc35d4410189e137 Mon Sep 17 00:00:00 2001 From: Amy Chen Date: Thu, 28 Jul 2022 14:34:57 -0700 Subject: [PATCH] disable strict mode that caused useEffect to be called twice --- src/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 410d9c70..d09cfa4b 100644 --- a/src/index.js +++ b/src/index.js @@ -4,8 +4,10 @@ import App from './components/App'; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( - - - + // turn strict mode off as it causes useEffect to be called twice, + // see issue https://github.com/facebook/react/issues/24455 + // + + // );