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

Deprecate removeListener APIs #2578

Merged

Conversation

yungsters
Copy link
Contributor

The following listener removal methods are deprecated. This update the documentation to reflect this, and it update the example code to use the recommended event subscription remove() methods.

  • Appearance.removeChangeListener
  • AccessibilityInfo.removeEventListener
  • Appearance.removeChangeListener
  • AppState.removeEventListener
  • Dimensions.removeEventListener
  • Keyboard.removeListener
  • Linking.removeEventListener

Test Plan:
Locally verified that the method is no longer documented by going to: http://localhost:3000/docs/next/scrollview#scrolltoend

@yungsters yungsters requested a review from lunaleaps April 5, 2021 21:26
@yungsters yungsters changed the title Deprecate removeListeners APIs Deprecate removeListener APIs Apr 5, 2021
@yungsters yungsters force-pushed the deprecate-removelisteners-docs branch from 6c7c331 to 02b41e3 Compare April 5, 2021 21:27
'screenReaderChanged',
this._handleScreenReaderToggled
);
this.reduceMotionChangedSubscription.remove();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the formatting off on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, yes. It is… thanks for catching that.

Copy link
Contributor

@lunaleaps lunaleaps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@yungsters yungsters force-pushed the deprecate-removelisteners-docs branch from 02b41e3 to 99f9447 Compare April 5, 2021 23:15
@yungsters yungsters merged commit 772a555 into facebook:master Apr 5, 2021
@yungsters yungsters deleted the deprecate-removelisteners-docs branch April 5, 2021 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants