Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update useDeviceOrientation.ts #46

Merged
merged 2 commits into from
Apr 16, 2022
Merged

Update useDeviceOrientation.ts #46

merged 2 commits into from
Apr 16, 2022

Conversation

llr101
Copy link
Contributor

@llr101 llr101 commented Sep 17, 2021

Use remove function instead of removeEventListener

Use remove function instead of removeEventListener
@enesozturk
Copy link
Owner

Hi @booyeu, I know it's been a long time. Thank you for your contribution! Just wanted to know what is the benefit of this usage? Is it prevents some bugs?

@llr101
Copy link
Contributor Author

llr101 commented Jan 6, 2022

removeEventListener is not recommended by react-native group. It shows warn now and may be removed in the future~~

@enesozturk
Copy link
Owner

I see, that is great, thanks!

@enesozturk
Copy link
Owner

enesozturk commented Jan 18, 2022

In line 13. I did not invoke the getWindowOrientation function 🤦🏻‍♂️ Looks like it is a mistake. And also wanted to discuss could we use the useWindowDimensions hook here to clarify this custom hook? That would be good. I will try to add it.

@enesozturk enesozturk merged commit 11d9129 into enesozturk:main Apr 16, 2022
@enesozturk
Copy link
Owner

Merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants