-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Labels
Description
Description
The createNavigationCommands
used to expose helper methods as part of the useNavigation
includes certain methods that does not require the componentId
parameter.
As those methods are exposed as useNavigation
hook you may end up providing an unnecessary dependency if you're using a useCallback
for a handler which is not actually required as you can just Navigation.showModal
which is static.
Proposal
- Move useful helper methods
setRoot
,showModal
andshowOverlay
away fromcreateNavigationCommands
and export them as helpers from 'react-native-navigation-hooks'import { setRoot, showModal, showOverlay } from 'react-navigation-hooks'
- Add deprecation warning to the following methods in
createNavigationCommands
:- setRoot
- showModal
- showOverlay
- setDefaultOptions
- dismissAllModals
- getLaunchArgs
- Remove the deprecated methods in the next major release
ignacioola, andyesp, cfranchella, vcalvello and eduardopelittiignacioola