Skip to main content

All Questions

Tagged with
122 votes
36 answers
266k views

How to get current route name in react-navigation?

I want the name of the current route or screen in react-navigation which I want to use inside if condition to make some changes.
Eshant Bist's user avatar
  • 1,585
46 votes
4 answers
62k views

react navigation v6 and v5, Disable swipe back action

I'm working with react navigation 5 : I created MainStackScreen and AuthStackScreen, const AuthStack = createStackNavigator(); function AuthStackScreen() { return ( <AuthStack.Navigator ...
Khaled Boussoffara's user avatar
10 votes
4 answers
7k views

In react-navigation, how do I get the dimensions of the visible area between the header and TabBar?

const viewableWindowHeight = Dimensions.get('window').height - Header.HEIGHT - ??? How do I get the TabBar height? What if the iPhone is X? How can I take that into account?
TIMEX's user avatar
  • 268k
8 votes
3 answers
8k views

Unsupported top level event type "onGestureHandlerStateChange dispatched in iphone X

I am facing an issue in react-navigation-drawer. "react-native-gesture-handler": "^1.0.16", "react-navigation": "^3.3.2" This two version is installed. A drawer is working properly in Android and ...
Shashin Bhayani's user avatar
8 votes
2 answers
6k views

Remove Warning : [react-native-gesture-handler] Seems like you're using an old API with gesture components, check out new Gestures system

I'm creating a project to learn React Native. I'm using typescript on this project. I added react-navigation : To make react-navigation working, I had to do : yarn add @react-navigation/native yarn ...
Limitless's user avatar
8 votes
3 answers
3k views

Refresh contentComponent in react-navigation

I am using React-Navigation where I am using functionality of custom drawer by using contentComponent of React-Navigation. const DrawerNavigation = DrawerNavigator({ DrawerStack: { screen: ...
Ravi's user avatar
  • 35.4k
7 votes
1 answer
1k views

How to implement an application-wide search bar?

It seems to be a pretty common task to have an application-wide search bar in the header. Unfortunately, I haven't found some ready recipes on how to accomplish it the right way. My solution was to ...
Denis Kulagin's user avatar
6 votes
4 answers
8k views

iOS (React native): Unnecessary space from the top of the header rendered using react navigation

Route Config /** * Author: Rahul * Date: 25 Feb 2018 * * Routes * @flow */ import React from 'react'; import { View, Text } from 'react-native'; import { StackNavigator } from 'react-navigation'...
shet_tayyy's user avatar
  • 5,675
6 votes
3 answers
9k views

Show a component in all screens with React-Navigation - React Native

I want to have a component like button (or react-native-action-button precisely) to be shown in each screen using React Navigation. Does React Navigation has any option in inside Routes to implement ...
Harshit Saxena's user avatar
6 votes
0 answers
814 views

Pull to dismiss React Navigation Modal

I am using gestureRespondeDistance: {vertical:Dimensions.get('window').height} on my mode modal screen in stackNavigator. The problem is that I have a ScrollView inside, so the swipe down to dismiss ...
DanielXander's user avatar
6 votes
3 answers
2k views

React Native crashing on iOS with react-navigation drawer

I'm getting an error on iOS only: TypeError: undefined is not an object (evaluating 'this._callListeners.bind') This error is located at: in DrawerLayout (at DrawerView.js:161) ... Project ...
Patrick Dench's user avatar
6 votes
1 answer
1k views

how to use LinearGradient for react tab navigator tabs

I have a react tabnavigator which i used it from ReactNavigation(v2) component: const Tab = createMaterialTopTabNavigator({ Nearest: { screen: Nearest, navigationOptions: { tabBarLabel: ...
Iman Salehi's user avatar
6 votes
1 answer
1k views

React Native iPad split screen components

I want two screen components to be rendered side by side on iPad, just like below. Is there a way to achieve this using react-navigation. I don't want slide-over left drawer. I want layout like ...
Ashish's user avatar
  • 345
6 votes
0 answers
2k views

React Navigation Stack Navigator default shadow styling

I'm using React Navigation to construct a tab bar based type of an app in ReactNative. "react-native": "0.44.0", "react-navigation": "^1.0.0-beta.9", I've got the navigation part pinned down and ...
hdsenevi's user avatar
  • 981
5 votes
1 answer
6k views

React Navigation - wrapping header and tab navigator in Blurview looses props

I am using React Navigation 2 for a simple RN project with Expo. I am trying to get the header and tabs on the bottom to display over a blurred background so I have done a HOC to wrap the library ...
Svetlin Staev's user avatar

15 30 50 per page
1
2 3 4 5
14