Questions tagged [react-native-navigation]

Use this tag for questions related to the React Native Navigation library that provides a complete native navigation solution for React Native apps.

React Native Navigation provides 100% native platform navigation on both iOS and Android for React Native apps.

For more info see github project

https://github.com/wix/react-native-navigation

1903 questions
9
votes
2 answers

react-native: Command `run-android` unrecognized. Maybe caused by npm install

Recently I started getting this issue, when I install a react-native package (eg: react-navigation) into my project, a whole bunch of packages are been removed (including react, react-native i think). And then when i try to run command…
Yeshan Jay
  • 1,403
  • 1
  • 9
  • 18
8
votes
2 answers

How to reset a Stack in a different Tab using React Navigation 5.x

My app has a TabNavigator with a StackNavigator in each Tab. I'm not resetting the stacks when navigating between them by clicking on different tabs, so when you change tab, the stack contains the previous state. However, occasionally from within a…
8
votes
3 answers

How to render svg image in React-Native?

Please try to help me! I need to render svg image from my folder "project/assest/images/test.svg" on android and ios view. I have tried : Solution 1 : Solution 2 : import SvgUri from 'react-native-svg-uri'; …
Kunvar Singh
  • 1,779
  • 2
  • 13
  • 21
8
votes
0 answers

Pure React Native app crashes on swiping after opening it in Release mode

I am using React-Navigation for my pure RN 0.61.2 app. The app runs perfectly when I use it on Debug mode. However, in Release mode when I try to open the Drawer Navigation menu or scroll down in a Tab menu, the app crashes…
Harky
  • 91
  • 6
8
votes
5 answers

store.getState is not a function Redux-persist

I'm trying to implement Redux-persist on my React Native app. Following the setup docs exactly, I changed my store.js from this: import { applyMiddleware, createStore } from 'redux'; import * as thunkMiddleware from 'redux-thunk'; import reducers…
user8887068
8
votes
2 answers

Pass props through CreateAppContainer

I'm trying to pass props through AppContainer. I was able to pass in through other components, but I can't figure out how to send props through createAppContainer in App.js: render() { return ( this.state.isLoggedIn ?
irondsd
  • 1,140
  • 1
  • 17
  • 34
8
votes
3 answers

Combine createStackNavigator and createBottomTabNavigator?

Scenario : I have an app working with three tabs for navigation (School, Admin, Family); I am now trying to add in other screens, that will not have corresponding tabs. These screens will be navigated to using something like…
8
votes
1 answer

Can't Add ReactNativeNavigation.xcodeproj to Libraries in Xcode

I can't add the ReactNativeNavigation.xcodeproj file to my projects Libraries. Any ideas on how to get around this? I left click on Libraries then click add files to my project then go into node_module → react-native-navigation → iOS but then I…
7
votes
10 answers

TypeError: (0, _native.useTheme) is not a function. (In '(0, _native.useTheme)()', '(0, _native.useTheme)' is undefined)

I created a drawerNavigator and now I'm trying to add an icon to the header. The issue is when I add my HeaderButton I get this error: Component exception In the navigationOptions I tried to use both HeaderButton and CustomHeaderButton but it…
Venus
  • 121
  • 1
  • 6
7
votes
3 answers

Change the default light grey background color

By default, every screen I created in react-native project use a very light grey color as its background color. As you see here: I wonder instead of I set backgroundColor for each screen of my project, is there a global place in react-native…
Leem.fin
  • 40,781
  • 83
  • 202
  • 354
7
votes
0 answers

"Should have a queue. This is most likely a bug in React. Please file an issue. " React-Native bug

I am getting the error in the title on a React-Native app that I am currently working on. I have gone through hours of troubleshooting, and there doesn't seem to be a solution online. From what I have gathered, the following hook const [isOpen,…
7
votes
3 answers

Highlight Current Active Drawer menu in React navigation v5

I have created a custom drawer navigator using react navigation version: 5.X, But the current active tab is not getting highlighted in custom drawer menu. I have added 'activeTintColor' in DrawerItem element, but it's not getting applied to active…
7
votes
2 answers

Unable to resolve "fbjs/lib/areEqual" from "node_modules\react-native-gesture-handler\createHandler.js"

I'm building a react-native application with expo, however, I have an error, therefore I'm unable to continue building the application. I even looked for the file in node_modules that is mentioned in the error message. I'm using the…
SK1dev
  • 1,049
  • 1
  • 20
  • 52
7
votes
2 answers

React Native: Migrate to AndroidX

I ran my Android RN project today and was presented with the following error Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex…
7
votes
1 answer

Why is this.props.componentId needed?

Why is this.props.componentId needed? What is its purpose? Why can't we use the library without that id being needed? react-navigation doesn't need something like that, and react-native-navigation v1 didn't use anything like that. So why does v2…
pvinis
  • 4,059
  • 5
  • 39
  • 59