Skip to content

Commit

Permalink
fix: useMemo hook removed from JSX, eslint issue ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
BilalQamar95 committed Aug 10, 2022
1 parent bb4069b commit 3730ac2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/react/AppProvider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ export default function AppProvider({ store, children }) {
setLocale(getLocale());
});

const appContextValue = useMemo(() => ({ authenticatedUser, config, locale }), [authenticatedUser, config, locale]);

return (
<IntlProvider locale={locale} messages={getMessages()}>
<ErrorBoundary>
<AppContext.Provider
value={
useMemo(() => ({ authenticatedUser, config, locale }), [authenticatedUser, config, locale])
}
value={appContextValue}
>
<OptionalReduxProvider store={store}>
<Router history={history}>
Expand Down
3 changes: 2 additions & 1 deletion src/react/PageRoute.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Route {...props} />
Expand Down

0 comments on commit 3730ac2

Please sign in to comment.