- Fix styling options on iOS 13.4 #950ac64 by yogevbd
- Fix white flicker when pushing a screen #a2bdfac by RobertPaul01
- Fix white topBar on pop with swipe gesture #6227321 by yogevbd
- Fix symbol collision with react-native-keyboard-input #8ad40e1 by yogevbd
- Fix overlays touch interception on new iPads #2ed434c
- Removes unable to find UIManager module warning #ba12604
- Reject pop command when viewController not found in the hierarchy #4413aa4
- Fix mergeOptions merging options with wrong child #3c38c50
- Fix build warnings and possible retain cycles issues #3f8577d
- Fix bottomTab icon hidden after setting badge #124f975 by yogevbd
- Add windows support to build scripts vai
npm run start-windows
command #afb5bff by mayconmesquita
- Fix largeTitle background color on iOS 13 no being applied #979cb6e by yogevbd
- Fix bottomTabs attach mode not working when BottomTabs are inside SideMenu #7d6029f by yogevbd
- Fix crash on iOS 10 when displaying stack layouts #e923b8c RomualdPercereau
- Fix modal presentation style not being applied on some layouts #931167e by yogevbd
- Fix truncated bottomTab.text with semibold fontWeight #b01629c by yogevbd
- Always drawBehind bottomTabs and topBar when translucent: true #6edbbf5 by yogevbd
- drawBehind when largeTitle is visible - fixes black large title #6edbbf5 by yogevbd
- Create new UITabBarItem instance on each bottomTab update #3757ff7 by yogevbd
- Delete duplicate misplaced files in root directory #6d61ec0 by ItsNoHax
- Add componentName to modalDismiss event #1c2558d by jinshin1013
- Support changing backButton fontFamily and fontSize #b438588 by yogevbd
- Fixed bottomTab text color not working correctly on iOS13 #211a46e by yogevbd
- Support backButton.testID #e1b76c1 by yogevbd
- Handle statusBar.visible in all layout types and not only in components #a2f5dbd by yogevbd
- Fix a lot of large title issues #54b2855
- Fix title and subtitle color animations when popping screens #5210848 by yogevbd
- Stop rejecting dismissAllModals promise if no modals are displayed #30b0b47 by guyca
- Support tabs without icons on Android #ef58a6c by guyca
- Fix autolink script - set minSdk to 19 #4ce0e89 by jinshin1013
- ExternalComponentController extends ViewController #c33ff12 by guyca
- Support react-native-youtube #2793a02
This release changes how layout.backgroundColor work on iOS to add parity with Android.
- layout.backgroundColor - applies background color to parent layouts (Stack, BottomTabs, SideMenu etc)
- layout.componentBackgroundColor - applies background color only to components
- Remove draw behind deprecation #950642d by yogevbd
- Fix layout.backgroundColor being applied to components, it's now applied to parent layouts #950642d by yogevbd
- Implement layout.componentBackgroundColor which is applied only to component ViewControllers #950642d by yogevbd
- Apply extendedLayoutIncludesOpaqueBars true on all viewControllers (this commit was originally added to v4 and was left out of v5 my mistake) #9fefeca
This release is focuses on shared element transition and on improving the installation process of the library.
Since RNN supports multiple react-native versions, the library has multiple flavors, each targeting a different RN version. We now chose the appropriate flavor based on the react-native version installed in node_modules.
-missingDimensionStrategy "RNN.reactNativeVersion", "reactNativeXX" // Where XX is the minor number of the react-native version you're using
We're starting to migrate RNN to Kotlin. All new code is written in Kotlin and existing code will be gradually converted to Kotlin. This requires you to declare the Kotlin version you're using in your project.
buildscript {
ext {
+ kotlinVersion = "1.3.61" // Or any other kotlin version following 1.3.x
+ RNNKotlinVersion = kotlinVersion
+ RNNKotlinStdlib = "kotlin-stdlib-jdk8"
}
dependencies {
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
In an effort to simplify RNN's integrations process as much as possible, we're minimizing the changes required to both MainApplication and MainActivity.
+import com.facebook.react.PackageList;
public class MainApplication extends NavigationApplication {
- @Override
- protected ReactNativeHost createReactNativeHost() {
- return new NavigationReactNativeHost(this) {
+ private final ReactNativeHost mReactNativeHost =
new NavigationReactNativeHost(this) {
@Override
protected String getJSMainModuleName() {
return "index";
}
+ @Override
+ public boolean getUseDeveloperSupport() {
+ return BuildConfig.DEBUG;
+ }
+ @Override
+ public List<ReactPackage> getPackages() {
+ ArrayList<ReactPackage> packages = new PackageList(this).getPackages();
+ return packages;
+ }
+ }
- }
+ @Override
+ public ReactNativeHost getReactNativeHost() {
+ return mReactNativeHost;
+ }
- @Override
- public boolean isDebug() {
- return BuildConfig.DEBUG;
- }
- @Nullable
- @Override
- public List<ReactPackage> createAdditionalReactPackages() {
- List<ReactPackage> packages = new ArrayList<>();
- return packages;
- }
}
Since RNN now supports auto linking, declaring the dependency manually is no longer needed.
-include ':react-native-navigation'
-project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../../lib/android/app/')
Add these lines to the bottom of your app/build.gradle
file.
+apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
+applyNativeModulesAppBuildGradle(project)
+apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
+applyNativeModulesSettingsGradle(settings)
include ':app'
As RNN is now autolinked, remove its pod from your podspec file. This will ensure the correct version is linked when running pod install
- pod 'ReactNativeNavigation', :podspec => '../node_modules/react-native-navigation/ReactNativeNavigation.podspec'
show and dismiss animation api have been fixed and are now in parity with Android api. If you've defined a custom modal animation, you can now consolidate the animation declarations.
New Android + iOS API | Unsupported iOS API |
options: {
animations: {
showModal: {
alpha: {
from: 0,
to: 1,
duration: 250,
}
}
}
} |
options: {
animations: {
showModal: {
content: {
alpha: {
from: 0,
to: 1,
duration: 250
}
}
}
}
} |
❗️topBar and bottomTabs drawBehind option will be removed in the next major version.
The drawBehind option has been an anti pattern on iOS from the start and was introduced only for parity with Android api. On iOS, when a ScrollView or a SafeAreaView are used as screen root; the system handles insets automatically. As adoption of notch devices increases, developers use these views regularly, rendering the drawBehind option useless.
During the migration phase, leave Android options unchanged and set
drawBehind: true
to both TopBar and BottomTabs in default options.
If you're animating translationY
or translationX
pass these values in dp instead of pixels.
This is especially relevant to values returned by await Navigation.constants()
api as these values are returned in dp. Now, if you'd like to use them in animations, you can do so without converting to pixels.
- On tab press event - handle tab selection in Js #b153142 by pontusab
- RN 0.62 support on Android #4bfa7c5 by safaiyeh
- Set default fontsize value for title and subtitle #0741799 by maryjenel
- Respect default options when updating bottomTab options #513138e by yogevbd
- Adapt NavigationBar buttons color according to NavigationBar background color #6521177 by rverbytskyi
- Disable TopBar scroll when nestedScrollEnabled is enabled #9a361a4 by guyca
- Reject promise when trying to push two children with same id #27ceea8 by guyca
- Fix drawBehind in default options not working #0e93366 by guyca
- Fix merge options leaks to next screen in stack #386bf65 by yogevbd
- Invoke all commands on the main thread #8843224 by yogevbd
- Resolve navigationItem from external component #d81b0bf by yogevbd
- Fix popGesture freezes the app #37473f8 by yogevbd
- Fix crash when check UIBarButtonItem are not added by RNN #233820e by wixiosalex
- Add modalAttemptedToDismiss event #87af42a by manicantic
- Add bottomTabLongPressed event on iOS #c425f83 by N3TC4T
- Send componentType field in componentDidAppear and componentDidDisappear events #3878b68 by guyca and yogevbd
- Fix topBar.title.component measurement on iOS 10 #82e4807 by yogevbd
- Remove yellow boxes from title and button components #b82d87f by yogevbd
- Fix default font size regression #8f9e719 by yogevbd
- Fix crash when reloading while an overlay is displayed #2fa17aa by yogevbd
- Fix conflict with React Native's getConstants #5e6d6fc by guyca
- Use lodash submodules instead of lodash to reduce bundle size #e53a9fe by (pontusab)[https://github.com/pontusab]
- Replace lodash chain with flow to reduce bundle size #bf354d7 by jinshin1013
- Send ModalDismissed event #4cb0e98 by yogevbd
- Fix incorrect
constants.topBarHeight
value when pageSheet modal is displayed #9ef61a9 by yogevbd - Add BottomTabs.attachMode support #60c4dfc by yogevbd
- Merge child options with SideMenu parent #afbaa9a by guyca
- Temporary fix to FAB position on screen #4714983 by guyca
- Introduce
modal.swipeToDismiss
option [#659a42c](https://github.com/wix/react-native-navigation/commit/
- Fix setting TopBar component in default options #4a1b8b4 by yogevbd
- Fix blinking react view button #d502c69 by yogevbd
- Let the system control modal presentation style #659a42c by yogevbd
- Fix black TopBar on iOS < 13 #7cf2083 by yogevbd
- Fix double back button #ed7c579 by yogevbd
- Fix transparent TopBar on iOS 13 #b560265 by yogevbd
- Fix TopBar.noBorder on iOS 13 #919fa12, #5b7ddec by yogevbd
- Fix crash when calling Navigation.constants() when BottomTabs don't exist #2cd4752 by yogevbd
- Support Xcode 11 - Xcode 10 is no longer supported
- Support centering bottomTab icons using bottomTabs.titleDisplayMode #26d3d82 by yogevbd
- Prevent creation of button react view with the same componentId #1807c5b by yogevbd
- Remeasure title component after orientation change #619af3e by yogevbd
- Fix memory leak when reloading the app #9970853 by yogevbd
- Support UINavigationBarBehavior #6f13d69, #9f43bca by yogevbd
- Automatically apply DrawBehind when tabs are hidden #002b7d8 by guyca
- Fix button disabled color has no effect #b66ff1d by guyca
- Fix BottomTabs background color changing to white background sometimes #57eb0db by guyca
- Include commandName in commandCompleted event #b904608 by jpgarcia
- Fix crash when title component is destroyed right after being attached #39ee170 by guyca
- Fix NPE when component appears under certain conditions #35851fc by heroic
- Apply layout direction directly on TopBar buttons container #14b5221 by guyca
- Allow navigationBarColor change within mergeOptions #8720628 by danielang
- Fix crash when null was used as bottomTab.color #c48ed74 by guyca
- add support for navigationBarColor #8af95da by mcuelenaere
- Prefer new imageWithTintColor API when tinting an UIImage #5d751f6 by danilobuerger
- Fixed disappearing StatusBar when displaying native ViewControllers #58c76e1 by yogevbd
- Fixed title layout issues on iOS 13 #898e187, #a3f176d, #094b9a7 by yogevbd
- Fixed leaking pageSheet modals on iOS 13 #2b4d897 by yogevbd
- Fix applying merged backButton options #aef5b2e by guyca
- Remove duplicate setDefaultOptions in UIViewController categories #0d31e30 by danilobuerger
- Don't consume SideMenu enabled option after applying it in mergeOptions #9faf458 by guyca
- supportedInterfaceOrientations didn't take default orientation value into account #9faf458 by guyca
- SideMenu always returned the centre ViewController as the current child and didn't take open SideMenu into account #9faf458 by guyca
- Stop recursive double setting of default options #d5c92b1 by danilobuerger
- Immediately unmount buttons removed by mergeOptions, instead of unmounting them when screen is unmounted #65dde34 by yogevbd
- Catch rare RuntimeException in setRoot when waitForRender = true #b048581 by rawrmaan
- Fix SideMenu enabled property issues #92fcf70 by Royce
- Fix replacing react title with text title not working #b434b4f by FRizzonelli
- Fix merging TopBar title, buttons and status bar options, broke in 3.1.1 #5409a62 by guyca
- Removed the legacy support lib #8663669 by SudoPlz
- Apply layout direction directly on views #fffd2d2 by guyca
-
Support RN 0.60
-
Migrate to AndroidX
-
Improve draw behind StatusBar
AddedstatusBar.translucent
boolean property -
BottomTabs are not pushed upwards when keyboard opens
-
Removed SyncUiImplementation SyncUiImplementation was used to overcome a bug in RN's UiImplementation. This workaround was added to RN's
UiImplementation
in RN 0.60 and can be removed from RNN.If you're using
SyncUiImplementation
your app will fail to compile after upgrading to v3. Simply remove the following code from yourMainApplication.java
- import com.facebook.react.uimanager.UIImplementationProvider; - import com.reactnativenavigation.react.SyncUiImplementation; - @override - protected UIImplementationProvider getUIImplementationProvider() { - return new SyncUiImplementation.Provider(); - }
-
BottomTab badge and dot indicator are not animated by default.
-
The following option will show a badge with animation
bottomTab: { badge: 'new, animateBadge: true }
-
The following option will show a dot indicator with animation
bottomTab: { dotIndicator: { visible: true, animate: true } }
-
-
Stack, BottomTabs and SideMenu are drawn behind StatusBar.
While parent controllers are drawn behind the StatusBar, their background isn't. This means that when transitioning from a destinations drawn under the StatusBar to a destination drawn behind it, the application's default background color will be visible behind the StatusBar. If you application's theme is dark, you might want to change thewindowBackground
property to mitigate this: Add the following to your application'sstyle.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowBackground">@color/backgroundColor</item> </style> <!--This is your application's default background color. It will be visible when the app is first opened (while the splash layout is visible) and when transitioning between a destination a screen drawn under the StatusBar to a destination drawn behind it--> <item name="backgroundColor" type="color">#f00</item> </resources>
- Stop recursive double setting of default options #3da2ca8 by danilobuerger
- Fix infinite loop while trying to remove react buttons #88fd1f1 by guyca
- Immediately unmount buttons removed by mergeOptions, instead of unmounting them when screen is unmounted #65dde34 by yogevbd
- Don't consume SideMenu enabled option after applying it in mergeOptions #9faf458 by guyca
- supportedInterfaceOrientations didn't take default orientation value into account #9faf458 by guyca
- SideMenu always returned the centre ViewController as the current child and didn't take open SideMenu into account #9faf458 by guyca
- Remove duplicate setDefaultOptions in UIViewController categories #452c4e6 by danilobuerger
- Add return type to Navigation.constants() #66ab3cd by danilobuerger
- Fixed react component button flicker #77ee4df by yogevbd
- Fix bug that reverts navbar title size to 17 #e677f97 by dcvz
- Fix SideMenu size after screen rotation #a591fe4 by lionerez1
- Set nil as default UITabBarItem.title value #76d832b by danilobuerger
- Fix Constants.topBarHeight being zero if root ViewController isn't a NavigationViewController #f19e523 by guyca
- Add width and height attributes to SideMenuSide type #73d621d by ball-hayden
- Fixed crash when calling Navigation.constants() when root view isn't BottomTabs #663b1c3 by daveyjones
- Fixed crash when setting react component as left button #29829ae by MarianPalkus
- Remove android * imports for support #35a19b5 by heroic
- Add back button to last child in setStackRoot #898cf7a by guyca
- Emit SideMenu visibility events #7ee9c12 by guyca
- Fix setStackRoot crash when called with the same id #3c08b1c by guyca
- Fix crashes related to race conditions around ViewController.destroy #f2e46ea by guyca
- Fix TopBar background React component flicker when pushing screens #99032e0 by FRizzonelli
- Add passProps to component typings file #42fd86d by Andarius
- Add missing topBar options #5566ffd by retyui
- Handle simultaneous recognizers, Fixes a crash when tapping on the screen with other gesture recognizers active #a5b9f58 by jordoh
- Fix bottomTabs’s animate option #9836730 by wsliaw
- Stop keeping hard reference to ViewControllers, remove RNNStore #275304c by yogevbd
- Return componentId on showModal #81dc07d by yogevbd
- Apply bottomTabs options after children added #2bddff3 by yogevbd
- Fix sideMenu orientation options #0e1a35d by yogevbd
- Fix broken TextInput focus in Overlay #e9ca247 by yogevbd
- Fix TopBar react view measurement issue #be00c4c by yogevbd
- Fix Height of SideMenu when device orientation changes #68c62f3 by mohammadalijf
- adding and removing components from registry manually by presenter #ac60d2f by yogevbd
- Attach and detach viewControllers explicitly in store #2830059 by yogevbd
- Fix StatusBarOptions duplication in xcodeproj #ab9fd65 by tyronet-sportsbet
- Match android dependencies to app configuration #e954a41 by alpha0010
- Do not setTag to bottomTabs if testId is null #9126ced by EliSadaka
- Clear sideMenu's visible options after applying #283f226 by ItsNoHax
- Fix command completion event commandId #0e29a03 by yogevbd
- Fix topBar buttons iconsInsets #e2dcef9 by yogevbd
- Fix prevent retaining button component in componentRegistry #0186b1a by yogevbd
- Fix and refactor animations options #a98f187 by yogevbd
- Fix display empty custom topBar background over valid custom background #6cb1e18 by RoTTex
- Add direction property to Layout TS declaration #025c5e8 by mohammadalijf
- Add enabled property to StackAnimation TS declaration #996f2b1 by larryranches
- [BREAKING] Rename animation options class name #4517d22 by guyca
- Fixed title centering issues #1899601 by hadimostafapour
- Cancel in-flight push animation on pop #47b7d2c by guyca
- Fix crash when calling setStackRoot multiple times in quick succession #fdee254 by guyca
- External component lifecycle events #602c669 by guyca
- Fixes initial screen size #e036743 by yogevbd
- Fix top bar buttons size on iOS 10 #8282d93 by yogevbd
- Prevent keyboard from hiding when overlay is shown #aba58b6 by tomhicks
- Fix loading local images #c82bc57 by guyca
- Update side menu options on open / close callback #43f05ee by gosuperninja
- Fix overflow visible for react button components in TopBar #54ff1cd by guyca
- RTL support #d09d010 by hadimostafapour
- Use autolayout constraints to set size of custom bar button item #362606b by eliperkins
- Ignore pan gesture when no drawer is enabled #664ef34 by StasDoskalenko
- Fix peek and pop preview on iOS #e7c0d16 by yogevbd
- Fix launch image matching for iPhone XR/XS Max portrait #dfd894a by oblador
- Add Icon insets support for topBar buttons #545e5fe by yogevbd
- SetRoot wait for render #5abea28 by yogevbd
- Improved RNNSplashScreen status bar styling #b3b88d1 by danielgindi
- Null check when parsing strings #eda4b9c by guyca
- Fixed modalDismissed event being emitted with wrong id #aef7745 by guyca
- Improve SplitView and BottomTabs interactions #954e734 by zzorba
- SplitView options are handled by presenter #00d5e31 by zzorba
- Fixes Large title and noBorder issue which caused color to change to default #9c48a78 by mohammadalijf
- Pull BottomTabs height from correct controller #8cee745 by paubins
- Fix custom back button missing id #578f6a8 by guyca
- Fix Android title centering #4aa5cd1 by StasDoskalenko
- passProps passed to setStackRoot and showOverlay can specify type with generics #bc23fba by henrikra
- passProps passed to showModal can specify type with generics #34f37aa by ruscoder
- Fix title height not being set on Android #09c8c37 by davrosull
- Support calling mergeOptions on ExternalComponents #b1e1ec8 by guyca
- Support iOS system item icons for top bar #7a26ea9 by BerndSchrooten
- Fixed settings backButton color dynamically #8434938 by masarusanjp
- Revert "Set elevation 0 when creating TopBar" #135c6eb by guyca
- Only set elevation values from Options #487c1da by guyca
- Road to implicit any part 5 #ee6dc78 by henrikra
- Road to implicitAny part 4 #02985c5 by henrikra
- Fixed the type mismatch for modalPresentationStyle #9ef60e9 by masarusanjp
- Render first tab first #e5a2efb by guyca
- Retrieve BuildConfig.DEBUG from Application in ImageLoader #b422dd0 by guyca
- Fix closing sideMenu when pushing a screen #dc739de by guyca
- Orientation.hasValue returns false for default orientation #43ae659 by guyca
- Measure TopBar buttons using using MeasureSpec.UNSPECIFIED #dd93c51 by guyca
- Add
layout.componentBackgroundColor
option - This option is used to set background color only for component layouts. #cb48065 by guyca
- SetStackRoot now accepts an array of children which will replace the current children. #2365e02 by guyca
- Add typed interface to constants #a71e731 by pie6k
- Remove some implicit anys and refactor tests #c27fa5c by henrikra
- Improve support for Context API and other Provider based apis #9d36521 by guyca
Skipped versions due to CI maintenance
- Fix title.font when subtitle supplied - Font wasn't applied on title, when subtitel was provided. #14a5b74 by yogevbd
- Fix invisible modals edge case. When an Overlay was displayed before setRoot was called, Consecutive Modals and Overlays were attached to the wrong window. #b40f8ed by yogevbd
- Component name can be a number as well to support enum component names #e32d8d2 by henrikra
- Update lodash to v4.17.x #77e2faa by guyca
- Add props to TopBarButton type #4373 by gsdatta
- Add title alignment to OptionsTopBarTitle #bd00422 by minhloi
- popGesture on stack root freezes the app #4388 by yogevbd
- setRoot on main application window - fix setRoot on iPad a3922f8 by yogevbd
- Fix "Multiple commands produce..." build error on Xcode 10 #b5d300f by yogevbd
- Add optional componentId param to bindComponent #0a6e34f by luigiinred