react-native-navigation

How to unmount a previously mounted component in stack navigator (react-navigation 2.X)?

痞子三分冷 提交于 2020-08-22 19:06:10
问题 This is a simplified flow of my app:- login homepage (has options to color diagram or create diagram) colorInDiagram (user colors parts of a diagram) makePayment homepage(back to homepage) Now, after this if user decides to color a diagram again, he/she will choose that particular option from the homepage and the flow will continue as usual. This happens because after payment, the user will go back to the homepage(which is already loaded), and every other screen will reset. As the app is

React Native: React Navigation - use the same header component in every screen?

十年热恋 提交于 2020-07-10 09:44:46
问题 So, I'm trying to use React Navigation and I want to use the same Header component across all my screens. I used the expo-cli to create the project. In my MainTabNavigator.js file, I have a HomeStack and SettingsStack , and they look like this: const config = Platform.select({ web: { headerMode: "screen" }, default: {} }); const HomeStack = createStackNavigator( { Home: HomeScreen }, config ); HomeStack.navigationOptions = { tabBarIcon: ({ focused }) => ( <NavButton focused={focused} name=

React Native: React Navigation - use the same header component in every screen?

柔情痞子 提交于 2020-07-10 09:44:27
问题 So, I'm trying to use React Navigation and I want to use the same Header component across all my screens. I used the expo-cli to create the project. In my MainTabNavigator.js file, I have a HomeStack and SettingsStack , and they look like this: const config = Platform.select({ web: { headerMode: "screen" }, default: {} }); const HomeStack = createStackNavigator( { Home: HomeScreen }, config ); HomeStack.navigationOptions = { tabBarIcon: ({ focused }) => ( <NavButton focused={focused} name=

React native BottomTabNavigator with DrawerNavigator, how to keep bottom navigator visible all the time

你说的曾经没有我的故事 提交于 2020-07-05 12:28:13
问题 I have gone through various posts on SO and github about react navigation, but most of them are a combination of react native stack navigator with drawer navigator. I couldn't find anything that could help fix my problem. What i am trying to do is i have a bottom tab bar with five screens which load nicely with correct data, i want to add a drawer navigator to provide more screens and have different data. I have managed to build the drawer navigator on top of the tab navigator but when the

React-navigation tabbar larger icon in the middle

倾然丶 夕夏残阳落幕 提交于 2020-06-25 10:00:42
问题 Please feel free to point me in the correct direction if this has been answered elsewhere, but I can't find it via here, or Google. Maybe I just don't know this correct name for this thing? I am currently working with React-navigation (for react-native) and I wonder if it is possible to make one icon in the center of the tab bar larger than the others, in particular with transparency behind it when the page scrolls. Mock up here for an example: Larger icon in middle overlaying scrollable area

Requiring unknown module “11” error on iOS simulator

跟風遠走 提交于 2020-05-27 04:21:42
问题 When I run the react native project with react-native run-ios .It shows the following error on my iOS simulator.On my android simulator, it is totally ok.I have deleted node module and reinstalled.But the error is still there.I don't want to entirely delete my ios/build folder since I have manually added library dependencies in there and that third party libraries were working properly in my react native project.Can someone help me with this? Error Message Requiring unknown module "11".If you

Bootstrap method returned null - Android crash immediately on launch

那年仲夏 提交于 2020-05-22 09:15:45
问题 Newbie to React Native and react-native-navigation. App works correctly on iOS but throws the exception below very quickly on launch: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.engagereact, PID: 8105 java.lang.BootstrapMethodError: Exception from call site #3 bootstrap method at com.reactnativenavigation.react.JsDevReloadHandler.<init>(JsDevReloadHandler.java:29) at com.reactnativenavigation.react.ReactGateway.<init>(ReactGateway.java:29) at com.engagereact.MainApplication

Undefined is not an object 'navigation.navigate' React Native Navigation 5 (NEW)

回眸只為那壹抹淺笑 提交于 2020-05-17 03:55:52
问题 I am doing doing navigation with new react native navigation all I want is when button is pressed it navigate to next screen, I have followed new documentation but the problem is I am doing with classes and in the documentation all the work is done with functions in App.js, I tried to modify my code accordingly but couldn't do with classes as onPress button it does not navigate instead gives me error. This is my app.js: import * as React from 'react'; import { Button, View, Text } from 'react

Undefined is not an object 'navigation.navigate' React Native Navigation 5 (NEW)

蹲街弑〆低调 提交于 2020-05-17 03:54:49
问题 I am doing doing navigation with new react native navigation all I want is when button is pressed it navigate to next screen, I have followed new documentation but the problem is I am doing with classes and in the documentation all the work is done with functions in App.js, I tried to modify my code accordingly but couldn't do with classes as onPress button it does not navigate instead gives me error. This is my app.js: import * as React from 'react'; import { Button, View, Text } from 'react