diff --git a/src/react/AppProvider.jsx b/src/react/AppProvider.jsx index 2cc7eac13..36bc12037 100644 --- a/src/react/AppProvider.jsx +++ b/src/react/AppProvider.jsx @@ -61,13 +61,13 @@ export default function AppProvider({ store, children }) { setLocale(getLocale()); }); + const appContextValue = useMemo(() => ({ authenticatedUser, config, locale }), [authenticatedUser, config, locale]); + return ( ({ authenticatedUser, config, locale }), [authenticatedUser, config, locale]) - } + value={appContextValue} > diff --git a/src/react/PageRoute.jsx b/src/react/PageRoute.jsx index 86d5ffc57..66ecc1158 100644 --- a/src/react/PageRoute.jsx +++ b/src/react/PageRoute.jsx @@ -22,7 +22,8 @@ export default function PageRoute(props) { if (match) { sendPageEvent(); } - }, [match]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [JSON.stringify(match)]); return (