Create BottomTabs once when options are applied
The BottomTabs library we use recreates its children each time a style property changes.
This can hinder performance quite a bit as the view creation logic is quite costly.
This commit introduces a simple fix to this issue - we delay view creation until all options are applied.
BottomTabs refactor
* Prevent view recreation in `onSizeChanged`
* Cleanup `createTabs` method
This property is used to set background color only for components,
unlike backgroundColor which sets color for every type of layout.
Motivation
When a view appears, its options are resolved according to its
currently displayed children. Basically this means that child options
are hoisted to the parent as children can declare options which effect
their parent.
This means that if a component has declared layout.backgroundColor or
if that property was declared in defaultOptions, each view will have a
background color, which might contribute to a significant overdraw.
This property can be used to control how the SideMenu is opened using swipe gesture
bezel - only swipes from the side of the screen open the side menu
entireScreen - Swipe from any area of the screen will open the SideMenu
This PR adds support for setting stack root with multiple children, which is to be expected as stack can be initialised with multiple children.
Closes #4441
The following PR introduces improved support for Context api and other api's which wrap the root view.
## Context api
Navigation.registerComponent('navigation.playground.ContextScreen', () => (props) => (
<TitleContext.Provider value={'Title from Provider'}>
<ContextScreen {...props} />
</TitleContext.Provider>
), () => ContextScreen);
## Redux
Navigation.registerComponent('navigation.playground.ReduxScreen', () => (props) => (
<Provider store={reduxStore}>
<ReduxScreen {...props} />
</Provider>
), () => ReduxScreen);
## Plain Component - not changed
Navigation.registerComponent('navigation.playground.MyScreen', () => MyScreen);
This PR also upgrades the TypeScript version to 3.2.0 and RN version used in the playground app to 0.57.7
* New Android build flavor - `reactNative57_7`
* Unit test coverage is disabled, for some reason it broke after upgrading to RN 0.57.7
Until now controlling drawers touch gestures was impossible, drawers received gesture opening touch from the entire screen and that causes collisions with other gestures (which are implemented on the javascript side).
This commit adding modes for how sideMenu drawers gestures will receive opening touch.
```
{
sideMenu: {
openGestureMode: 'entireScreen' | 'bezel'
}
}
```
- `entireScreen`: drawer gesture will trigger drawer opening from the entire screen
- `bezel`: drawer gesture will trigger drawer opening only from the center screen bezel frame
The default didn't change.
[v2][Android] Remove deprecated enableAapt2 property from docs (#4343)
Adding `android.enableAapt2=false` broke the build from Android Studio with an error `Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'`
Both command line and Android Studio builds worked fine after removing it.