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

RN 0.65 Warning for useAppState #243

Open
kneza23 opened this issue Aug 20, 2021 · 3 comments
Open

RN 0.65 Warning for useAppState #243

kneza23 opened this issue Aug 20, 2021 · 3 comments

Comments

@kneza23
Copy link

kneza23 commented Aug 20, 2021

EventEmitter.removeListener('appStateDidChange', ...): Method has been deprecated. Please instead use remove() on the subscription returned by EventEmitter.addListener.

@mitsuharu
Copy link

useDeviceOrientation, too. I will try PR that replace removeEventListener, however each addEventListener() returns void at @type/react-native: "0.62.18" in package.json.

Latest @types/react-native, Dimensions.addEventListener() returns EmitterSubscription.
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-native/index.d.ts#L6151-L6154

@punksta
Copy link

punksta commented Oct 18, 2021

useDimensions also.

@KrisLau
Copy link

KrisLau commented Nov 11, 2021

Same with useKeyboard

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

No branches or pull requests

4 participants