Skip to content

Register multiple navigatorEventListeners#2173

Merged
guyca merged 1 commit into
masterfrom
multipleNavigatorEvents
Nov 16, 2017
Merged

Register multiple navigatorEventListeners#2173
guyca merged 1 commit into
masterfrom
multipleNavigatorEvents

Conversation

@guyca
Copy link
Copy Markdown
Collaborator

@guyca guyca commented Nov 16, 2017

This commit adds ability to register multiple navigator event listeners:
navigator.addOnNavigatorEvent(func)
navigator.removeOnNavigatorEvent(func)

Event listeners are removed when the screen the navigator is bound to
is unmounted, calling removeOnNavigatorEvent isn't mandatory.

As this api conflicts with the current api, addOnNavigatorEvent can't be used
in a screen where setOnNavigatorEvent was used before.

closes #2157

This commit adds ability to register multiple navigator event listeners:
navigator.addOnNavigatorEvent(func)
navigator.removeOnNavigatorEvent(func)

Event listeners are removed when the screen the navigator is bound to
is unmounted, calling `removeOnNavigatorEvent` isn't mandatory.

As this api conflicts with the current api, addOnNavigatorEvent can't be used
in a screen where setOnNavigatorEvent was used before.
@guyca guyca merged commit d71a42f into master Nov 16, 2017
@guyca guyca deleted the multipleNavigatorEvents branch November 16, 2017 12:31
thanhzusu pushed a commit to thanhzusu/react-native-navigation that referenced this pull request Nov 27, 2017
* master: (22 commits)
  setTabButton to change the label of the TabButton (wix#2215)
  3D Touch Preview API (wix#2186)
  Update android-specific-use-cases.md
  Update android-specific-use-cases.md
  Load props from props registry for redux screens
  Nav bar save props (wix#2211)
  Support passing unserializable props to custom navBar component
  Save buttons props for root screens
  Ensure that styles set on individual buttons are not overridden (wix#2200)
  Update top-level-api.md
  (Android) Allow disableOpenGesture right or left in the drawer (wix#2189)
  Revert "Support iOS 11 prefersLargeTitles #1643 (wix#2090)" (wix#2204)
  Support iOS 11 prefersLargeTitles #1643 (wix#2090)
  Support passing unserializable props to custom button (wix#2192)
  addOnNavigatorEvent improvements (wix#2175)
  Fix missing props (wix#2179)
  Revert "Don't custom button props over the bridge (wix#2174)" (wix#2177)
  Don't custom button props over the bridge (wix#2174)
  Set missing TopBar background color
  Register multiple navigatorEventListeners (wix#2173)
  ...
garrettm pushed a commit to Ginger-Labs/react-native-navigation that referenced this pull request Dec 19, 2017
This commit adds ability to register multiple navigator event listeners:
navigator.addOnNavigatorEvent(func)
navigator.removeOnNavigatorEvent(func)

Event listeners are removed when the screen the navigator is bound to
is unmounted, calling `removeOnNavigatorEvent` isn't mandatory.

As this api conflicts with the current api, addOnNavigatorEvent can't be used
in a screen where setOnNavigatorEvent was used before.
garrettm pushed a commit to Ginger-Labs/react-native-navigation that referenced this pull request Dec 19, 2017
This commit adds ability to register multiple navigator event listeners:
navigator.addOnNavigatorEvent(func)
navigator.removeOnNavigatorEvent(func)

Event listeners are removed when the screen the navigator is bound to
is unmounted, calling `removeOnNavigatorEvent` isn't mandatory.

As this api conflicts with the current api, addOnNavigatorEvent can't be used
in a screen where setOnNavigatorEvent was used before.
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.

1 participant