Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haxe-react/react-native-navigation
Haxe externs for wix's react-native-navigation
https://github.com/haxe-react/react-native-navigation
Last synced: about 2 months ago
JSON representation
Haxe externs for wix's react-native-navigation
- Host: GitHub
- URL: https://github.com/haxe-react/react-native-navigation
- Owner: haxe-react
- Created: 2018-12-19T14:13:38.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-25T19:23:41.000Z (almost 3 years ago)
- Last Synced: 2023-03-24T01:53:21.389Z (almost 2 years ago)
- Language: Haxe
- Size: 18.6 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-native-navigation
Haxe externs for [wix's react-native-navigation](https://github.com/wix/react-native-navigation) v2**react-native-navigation v1 is not supported by this lib**, please PR on a v1 branch if needed.
## Installation
Install the haxelib:
```
haxelib git https://github.com/haxe-react/react-native-navigation.git
```Add this option to you `.hxml` file(s):
```
-lib react-native-navigation
```## Usage
```
import react.native.navigation.Navigation;// register your screens
Navigation.registerComponent('myapp.Login', function(){ return myapp.screen.Login; });
// or with redux
Navigation.registerComponentWithRedux('myapp.Home', function(){ return myapp.screen.Home; }, Provider, store);// ...
// launch the app
Navigation.events().registerAppLaunchedListener(
function(){
Navigation.setRoot(
{
root: {
stack: {
children: [
{
component: {
name: 'myapp.Login',
options: {
topBar: { visible: false }
}
}
}
],
options: {
layout: { orientation: [Portrait] },
}
}
}
}
);
reactnative.splashscreen.SplashScreen.hide();
}
);// ...
// then in your screen components, do:
Navigation.push(
props.componentId,
{
component: {
name: 'myapp.Home',
passProps: { username: 'Thomas' },
options: {
topBar: {
title: { text: 'Welcome Thomas!' },
}
}
}
}
);
```### Platforms specific
Android and iOS specific options are enabled with the `-D android` and `-D ios` compilation flags (in you `.hxml` file(s)).