Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Conversation

@ninjz
Copy link

@ninjz ninjz commented May 15, 2022

The hook useDimensionsListener returns a new object. This results in the hook useDimensionsChange to always call the effect callback on each render since useDimensionsListener() returns a new object each time.

This PR fixes this by using the screen and window properties explicitly as the dependencies for useEffect.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant