Played around with context api, tried to get the wrapped component to rerender after global context
was updated - this is what I came up with.
Note: this commit makes the playground app use a newer js core as the js core which shipped with RN on Android
is missing javascript Proxy.
Closes #4517
Orientation.hasValue returns false for default orientation
This bug caused orientation set in defaultOptions to be disregarded.
Setting default orientation is still somewhat wrong now that its behaviour has changed when targeting SDK 28.
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
Implement Element transition on Android
This commit adds basic support for Element transition to Android.
Currently, only Shared Transition is supported and only when pushing screens.
There are a few caveats you need to be aware of if you intend to use
this feature in its current state:
1. Since elements need to be laid out before the transition can start, Set `waitForRender: true` when pushing the destination screen.
2. Fade animation has to be used when pushing screens with shared elements.
API
```js
options: {
animations: {
push: {
waitForRender: true,
content: {
alpha: {
from: 0,
to: 1,
duration: 250
}
}
}
},
customTransition: {
animations: [
]
}
}
```
* Support RN 0.55.4
This commit adds support for RN 0.55.4 by introducing version specific build flavors - reactNative51
* Update scripts after introducing build flavors
* Update Android installation instruction on specifying build flavor
Further work on TopTabs and some refactoring (#2362)
* Further work on TopTabs and some refactoring
* OptionsPresenter receives views as params
* Remove TopBar and style logic from ViewControllers, these are the OptionsPresenters concern
* StackAnimator isn't coupled to LinearLayout
* Convert Runnable to lambda
* ContainerLayout now implements ReactContainer interface
* Enable desugaring in playground app
* TopTabs unit tests
Navigator.push allows us to open a new screen. Currently it starts a new Activity with the screen
as it’s root view, but this is only a temporary behaviour. The intended behaviour is similar to
View Controllers on iOS which allows you to manage view hierarchies or a stack of fragments
managed by FragmentManager on Android.