Is there a light box component that works with react navigation?
I tried react-native-lightbox but it requires the Navigator instance which isn't handily available when you use react-navigation.
Just use withNavigation to make sure it always gets passed in.
https://reactnavigation.org/docs/with-navigation.html
Related
I am thinking of using Bottom Tab Bar or a Bottom Sheet, but I am unable to make it visible on all screens of my Stack Navigator.
Any idea or suggestion will be hugely appreciated.
You probably need to use redux, and modal from react-native and wrap your component to the root.
if you use component in the root then you can use it anywhere with the help of redux.
i am currently working on an App for Android and iOS - i am using react native.
Is there any way to hide the navigation bar dynamically in react-navigation or should i rather switch to react native router flux?
When the user changes to landscape i want to hide the navigation bar, when he goes back to Portrait, i want to show it again.
I know how to change it statically by using {header: null} in the navigation Options, but this does not help me in this case, at least i did not find a way to solve this.
Thanks in advance!
This is sort of a hack but I think you can replace the provided header component from React navigation with your own, then add a redux state that controls its visibility.
Either wrap your screens with a view that contains an onLayout event that will trigger redux action to set the visibility of your custom header.
How to use ReactNavigator (https://reactnavigation.org) in pair with ReactNative Interactable(https://github.com/wix/react-native-interactable) for animated transiotion between Navigator states ?
Has anyone tried this ?
In general I need to create a component, which takes routes config like StackNavigator proposes from React Navigator library and this component should gets left/right/top/bottom screens views and show then on swipe from left/right/top/bottom sides of the phone respectively.
So StackNavigator is suitable for me. But I need to switch between routes with screen custom animation. And I need to has a possibility to swipe from the any side of the phone device!
Help please!! Thanks!
I would like to have two buttons on the right side of the navbar. I am using the React Native Navigator component. I know I can put a button to the right side of the navbar but how can I put more than one?
Something like that.
On Android if you are using ToolbarAndroid you can pass an array of items to actions prop.
https://facebook.github.io/react-native/docs/toolbarandroid.html#actions
On iOS if you are using NavigatorIOS unfortunately there is no way you can do such a thing but if you are using Navigator you can design it yourself
https://facebook.github.io/react-native/docs/navigator.html#navigation-bar
I'm using React Native 0.14.0 to develop an Android application. Currently I'm using the ToolbarAndroid component to add a toolbar on top of my scene, but it is not kept between scenes. I found that the Navigator has a navigationBar property, which can be set to a Navigator.NavigationBar component, which should include an object dealing with the title and left and right buttons of the navigation bar. See the official example to understand what I mean. As there is little documentation on this part, I have to rely on the example to set the navigationBar properly.
This Navigator.NavigationBar is not as powerful as the ToolbarAndroid, as itdoesn't automatically have space for the logo, for example.
Is there any way to use ToolbarAndroid with the navigationBar property of the Navigator?
Not really. The closest you could probably get is to wrap the ToolbarAndroid in a component and map the navigator left, right methods to the onIconClicked functions. But that defeats the purpose as you are probably most interested in the ToolbarAndroid's UI.
You need to pass a component that will behave something like the Navigator.NavigationBar. If you can drop in a component that will play nice and provide some of the expected props then it'll work.