Skip to content

Commit

Permalink
[fix] remove dependencies from useEffect (componentDidMount) (#2930)
Browse files Browse the repository at this point in the history
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
  • Loading branch information
igorDykhta authored Jan 22, 2025
1 parent 5792644 commit 803b2f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/demo-app/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ const App = props => {
_loadSampleData();

// Notifications
// _loadMockNotifications();
}, [dispatch, id, provider, query]);

// no dependencies, as this was part of componentDidMount
}, []);

Check warning on line 168 in examples/demo-app/src/app.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

React Hook useEffect has missing dependencies: '_loadSampleData', 'dispatch', 'id', 'provider', and 'query'. Either include them or remove the dependency array

const _setStartScreenCapture = useCallback(
flag => {
Expand Down

0 comments on commit 803b2f5

Please sign in to comment.