react-native-navigation

Babel overrides is not allowed in preset options react native navigation

≯℡__Kan透↙ 提交于 2019-12-05 18:01:20
I trying to add a router react native navigation v2 to this starter project on react-native , but I have a problem that is connected with babel package (probably). When I run react-native run-android I have this error in Metro Bundler: loading dependency graph, done. : bundling failed: Error: [BABEL] D:\react—native\projecti\index.js: .overr ides is not allowed in preset options at Object.keys.forEach.key (D:\react—native\projecti\node_modules\metro\node odules\Obabel\core\lib\config\validation\options.js:71:13) at Array.forEach () at validate (D:\react—native\projecti\node_modules\metro\node

wix react native navigation v2 | how to push new screen to current screen from side drawer component

我们两清 提交于 2019-12-04 12:54:55
I have the next layout: Navigation.setRoot( { root: { sideMenu: { right: { component: { id: 'sideDrawer', name: DRAWER, } }, center: { bottomTabs: { id: 'bottomTabs', children: [ { stack: { children: [ { component: { id: 'searchTab', name: SEARCH_TAB, options: { bottomTab: { text: 'Search', icon: iconsMap[ 'search' ], testID: 'searchTab', }, topBar, } } } ] } }, { stack: { children: [ { component: { id: 'secondTab', name: SECOND_TAB, options: { bottomTab: { text: 'Second Tab', icon: iconsMap[ 'random' ], testID: 'secondTab', }, topBar, } } } ] } }, ] } } } } } ) The drawer is open when a

React Native: Migrate to AndroidX

蹲街弑〆低调 提交于 2019-12-04 07:18:40
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 archives: Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes. Program type already present: android.support.v4.app.INotificationSideChannel$Stub I believe that in order to resolve this, it is required to migrate to AndroidX. I backed up my project and attempted to do it with Android Studio to no

React Native: Which navigator should I use? [closed]

只谈情不闲聊 提交于 2019-12-03 09:11:20
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I have to build a relatively big cross-platform (iOS & Android) application within 3 months. So far when it comes to React Native I only have experience with NavigatorIOS . Now while I never really ran into any problems with it I never see people recommending its use. The other options are Navigator , which

Refresh previous screen on goBack()

人盡茶涼 提交于 2019-12-03 08:08:11
问题 I am new to React Native. How can we refresh/reload previous screen when returning to it by calling goBack() ? Lets say we have 3 screens A, B, C: A -> B -> C When we run goBack() from screen C it goes back to screen B but with old state/data. How can we refresh it? The constructor doesn't get called 2nd time. 回答1: Yes, constructor is called only for the first time and you can't call it twice. First : But you can separate the data getter/setter from the constructor and put it in a function,

React Native: Which navigator should I use? [closed]

安稳与你 提交于 2019-12-02 23:39:15
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. I have to build a relatively big cross-platform (iOS & Android) application within 3 months. So far when it comes to React Native I only have experience with NavigatorIOS . Now while I never really ran into any problems with it I never see people recommending its use. The other options are Navigator , which seems simple enough but maybe doesn't allow much native UI support? and NavigatorExperimental which I know nothing

Refresh previous screen on goBack()

Deadly 提交于 2019-12-02 23:12:52
I am new to React Native. How can we refresh/reload previous screen when returning to it by calling goBack() ? Lets say we have 3 screens A, B, C: A -> B -> C When we run goBack() from screen C it goes back to screen B but with old state/data. How can we refresh it? The constructor doesn't get called 2nd time. Yes, constructor is called only for the first time and you can't call it twice. First : But you can separate the data getter/setter from the constructor and put it in a function, this way you can pass the function down to the next Scene and whenever you're going back you may simply

How to trigger an event when a component is shown when using react-native-navigation?

邮差的信 提交于 2019-12-02 22:28:35
I am using react-native with react-native-navigation. I would like to reload data when a component is shown. The component is shown when a user clicks on a tab navigation button. Should I use react life cycle events or is there something in react-native-navigation that can trigger a function when a user navigates back to a component? I am using redux, I am not sure if that could be used to help? This issue refers to onDisplay which seems like what I am looking for. However I can't find any official documentation about it - https://github.com/wix/react-native-navigation/issues/130 I like the

React Navigation vs. React Native Navigation [closed]

走远了吗. 提交于 2019-12-02 15:21:35
I just want to know honest, experienced and objetive points of view about these two soutions to implement the navigation in React Native: React Navigation React Native Navigation Which is better and why. Thanks React Native Navigation as the name says uses the native modules with a JS bridge, so performance will/may be better. requires native integration. While React Navigation is a simple and powerful solution provided by react native itself. Its an all JS implementation unlike the other that uses native support which can be tricky. Just npm-install and you're good to go ... Use react

React Native Navigation Passing back parameters two screen pop

左心房为你撑大大i 提交于 2019-12-02 08:57:11
I have a Screen for Main then it's push to Next for selection and passes parameters to next pushed screen and when you select something in that screen I need to pop(2) and send selected details to the main screen. But pop didn't accept parameters. How to accomplish this. I don't use Redux or MobX. You need to do this Screen A: this.props.navigation.navigate('ScreenB', { onPressScreenAFun: (params) => { this.screenAFun(params) }, }) screenAFun = (params) => { console.log(params) } Screen B: this.props.navigation.navigate('ScreenC', { onPressScreenBFun: (params) => { this.screenBFun(params) }, }