Skip to content

Deprecate removeListener APIs#2578

Merged
yungsters merged 1 commit into
react:masterfrom
yungsters:deprecate-removelisteners-docs
Apr 5, 2021
Merged

Deprecate removeListener APIs#2578
yungsters merged 1 commit into
react:masterfrom
yungsters:deprecate-removelisteners-docs

Conversation

@yungsters

Copy link
Copy Markdown
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
Comment thread docs/accessibilityinfo.md Outdated
'screenReaderChanged',
this._handleScreenReaderToggled
);
this.reduceMotionChangedSubscription.remove();

Copy link
Copy Markdown
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
Copy Markdown
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.

@lunaleaps lunaleaps left a comment

Copy link
Copy Markdown
Contributor

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 react: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