From 86e8696d501de8f3341fe3ec96682d96a4e3fe6d Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Tue, 26 Oct 2021 17:21:13 +0200 Subject: [PATCH] Active le mode strict de React MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Permet de détecter certains problèmes potentiels https://fr.reactjs.org/docs/strict-mode.html Activé car on a certaines erreurs étranges remontées par Sentry --- mon-entreprise/source/App.tsx | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/mon-entreprise/source/App.tsx b/mon-entreprise/source/App.tsx index b0a4a42b2..b9a6bcede 100644 --- a/mon-entreprise/source/App.tsx +++ b/mon-entreprise/source/App.tsx @@ -10,7 +10,7 @@ import { } from 'Components/utils/EngineContext' import { SitePathsContext } from 'Components/utils/SitePathsContext' import 'iframe-resizer' -import { useContext, useMemo } from 'react' +import { StrictMode, useContext, useMemo } from 'react' import { Helmet } from 'react-helmet' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' @@ -53,21 +53,23 @@ export default function Root({ basename, rules }: RootProps) { const paths = constructLocalizedSitePath(language as 'fr' | 'en') const engine = useMemo(() => engineFactory(rules), [rules]) return ( - { - setupInFranceAppPersistence(store) - setupSimulationPersistence(store) - }} - initialStore={{ - inFranceApp: retrievePersistedInFranceApp(), - }} - > - - - - + + { + setupInFranceAppPersistence(store) + setupSimulationPersistence(store) + }} + initialStore={{ + inFranceApp: retrievePersistedInFranceApp(), + }} + > + + + + + ) }