react-native-router-flux

Render global footer in react-native-router-flux 3.x

情到浓时终转凉″ 提交于 2019-12-12 01:39:43
问题 I have an app where on all scenes I want to render a global navigation footer at the bottom of the screen. This was a very easy thing to do in RNRF 2.x with the footer prop, but I'm having quite a lot of trouble implementing it in 3.x since the footer prop does not exist anymore. Anyone know how to go about doing this? 回答1: You can do this with only React Native. Just wrap your old main component in a new View that contains the old main component and the footer. Then the footer will always be

React-native-router-flux scene render multiple times

女生的网名这么多〃 提交于 2019-12-11 04:35:40
问题 So I use react-native-router-flux and here is my scene <Scene key="changePassword" component={ChangePassword} title="Change Password"/> And I have this button which will route to that scene when clicked <Button style={styles.button} onPress={() => Actions.changePassword()}> If I click the button for many times, multiple scene will pop up. Is there any way to prevent this? Thank you for your help guys :) 回答1: you can try to give delay if the button has been clicked, put local state like this:

Duplicate module name: react-native-vector-icons

邮差的信 提交于 2019-12-09 17:25:47
问题 When I install NativeBase and React-Native-Router-Flux in my react-native project I get this error: Failed to build DependencyGraph: @providesModule naming collision: Duplicate module name: react-native-vector-icons Paths: /Users/vittori/Desktop/repos/GitHubExamples/native-starter-kit/node_modules/react-native/local-cli/core/__fixtures__/files/package.json collides with /Users/vittori/Desktop/repos/GitHubExamples/native-starter-kit/node_modules/react-native-router-flux/node_modules/react

Passing props in react-native-flux-router

筅森魡賤 提交于 2019-12-08 09:13:28
So I'm still a bit new to React Native, but I've got an app working nearly how I want it to. I have App.js which uses the TabBarIOS component to display my tabbed navigation at the bottom of the screen. When you touch a tab, the state updates and the relevant content is loaded and displayed: App.js import React, { Component } from 'react'; import { TabBarIOS, Platform, Image } from 'react-native'; import IconII from 'react-native-vector-icons/Ionicons'; import IconMCI from 'react-native-vector-icons/MaterialCommunityIcons'; import Colors from './Colors'; import RouterItem1 from './routers

Passing props in react-native-flux-router

拈花ヽ惹草 提交于 2019-12-08 05:16:13
问题 So I'm still a bit new to React Native, but I've got an app working nearly how I want it to. I have App.js which uses the TabBarIOS component to display my tabbed navigation at the bottom of the screen. When you touch a tab, the state updates and the relevant content is loaded and displayed: App.js import React, { Component } from 'react'; import { TabBarIOS, Platform, Image } from 'react-native'; import IconII from 'react-native-vector-icons/Ionicons'; import IconMCI from 'react-native

react native router Actions.SCENE doing nothing

懵懂的女人 提交于 2019-12-07 18:29:54
问题 I'm adding a simple login screen to my app, but I'm not able to call Actions.home once the user is authenticated. I have a button that when pressed, calls a function to connect to the server and get auth status, and when successful, I call Actions.home. but nothing happens. no error or warning. just nothing. I have tried all forms of it, Actions.home, Actions.home(), {Actions.home}, saving Actions.home as state in the constructor and then using state, ... nothing worked. but in my other

How to implement react-native-drawer in react-native-router-flux with redux?

浪子不回头ぞ 提交于 2019-12-06 09:05:17
问题 I am trying to implement react-native-drawer in react-native-router-flux with redux. Tried following this example: https://github.com/aksonov/react-native-router-flux/blob/master/docs/OTHER_INFO.md but still getting an error: Element type is invalid: expected a string (for built-in components) but got: object. Check the render method of 'DefaultRenderer'. What the correct way to implement the drawer in react-native-router-flux? EDIT - UPDATE: Yet still getting the error 'Element type is

react-native-router-flux: How to prevent Tab Scene history stack from being reset when changing between tabs?

 ̄綄美尐妖づ 提交于 2019-12-06 01:39:42
问题 I have a Router setup with 2 tab scenes: Tab 1: have 2 navigable scenes (static screens); Screen A: have a button to navigate to Screen B ; Screen B: just have a text; Tab 2: just have 1 static screen. Screen C: just have a text; The code is as follows. app.js: import React from 'react'; import { Router, Scene } from 'react-native-router-flux'; import Tab from '../tab'; import ScreenA from './a'; import ScreenB from './b'; import ScreenC from './c'; export default class App extends React

react native router flux: override left or right button inside component and access local function

a 夏天 提交于 2019-12-05 19:55:22
I was able to override the button inside the compononent but not able to call the local function, for example when I press "Refresh", nothing happen. Is this the correct way to override the button text and perform function. Your help is appreciate. Thanks. import { WebView } from 'react-native' import React, { PropTypes, Component } from 'react'; import { View, Text } from 'react-native'; import styles from '../src/styles/home' var WEBVIEW_REF = 'webview'; class WebViewComponent extends Component { static rightTitle = "Refresh"; static onRight() { this.reload; } static propTypes = { url:

onEnter/onExit method in React Native Component (react-native-router-flux)

蓝咒 提交于 2019-12-05 18:25:58
So I can use the onEnter/onExit method at the root of my app in the router definitions and it works perfectly fine: <Scene key="arena" hideNavBar={true} onEnter={() => console.log("Entered")} component={ArenaPage} /> Is there any way I can do this inside the component itself so that I can update the local state?? export default class ArenaPage extends Component { onEnter () { this.setState(...) } // Render blah blah blah... } If not possible, Is there anyway to trigger componentWillUnmount when navigating away from Scene (Actions.[key]) Please check latest react-native-router-flux:beta.27 ,