How to use the react-native-router-flux.Actions.reset function in react-native-router-flux

To help you get started, we’ve selected a few react-native-router-flux examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rastapasta / foodsharing / src / sagas / session.tsx View on Github external
function* loginFlow(email: string, password: string) {
  try {
    // Make sure and clean all cookies known to us
    yield CookieManager.clearAll()

    // Here we go, login the user
    const { id } = yield call(login, email, password)

    // All good, let's proceed to main
    Actions.reset('drawer')

    // .. or to another scene if we got a deep link incoming
    const initial = yield getInitialScene()
    if (initial)
      Actions.jump(initial.scene, initial.props)

    // Save the validated email and password in the device's safe store
    yield Keychain.setGenericPassword(email, password)

    // If we came that far, unhide the splash screen
    yield SplashScreen.hide()

    // Signal our succesful login and broadcast our fresh token and session
    yield put({type: LOGIN_SUCCESS, payload: {...getSession(), id}})

    // Pull our bells
github blindsidenetworks / bigbluetutor-client / client / React-Native / app / components / signin.js View on Github external
this.state.ds.on('error', (error, event, topic ) => {
      console.log(error, event, topic);
      Actions.reset('signin', {ds: this.state.ds, configurePush: this.props.configurePush})
    })
    GoogleSignin.configure({
github CarGuo / GSYGithubAPP / app / net / netwrokCode.js View on Github external
export default function (code, statusText) {
    switch (code) {
        case 401:
            //授权逻辑
            if (Actions.currentScene !== 'LoginPage') {
                Actions.reset("LoginPage");
            }
            return "未授权或授权失败";//401 Unauthorized
        case 403:
            Toast(I18n('noPower'));
            return "403权限错误";
        case 404:
            //Toast(I18n('notFound'));
            return "404错误";
        case 410:
            Toast(I18n('gone410'));
            return "410错误";
        case NETWORK_TIMEOUT:
            //超时
            Toast(I18n('netTimeout'));
            return I18n('netTimeout');
        default:
github blindsidenetworks / bigbluetutor-client / client / React-Native / app / components / signin.js View on Github external
this.state.dataRecord.whenReady(() => {
              if (!this.state.profileRecord.get("onboardingComplete")) {
                Actions.onboard({ds: this.props.ds, username: this.state.username, profileRecord: this.state.profileRecord, dataRecord: this.state.dataRecord, configurePush: this.props.configurePush});
              } else {
                var configurePush = this.props.configurePush.bind(this)
                configurePush()
                Actions.reset('drawer', {ds: this.props.ds, username: this.state.username, profileRecord: this.state.profileRecord, dataRecord: this.state.dataRecord, configurePush: this.props.configurePush});
                Actions.home({ds: this.props.ds, username: this.state.username, profileRecord: this.state.profileRecord, dataRecord: this.state.dataRecord, configurePush: this.props.configurePush});
              }
            })
          })
github blindsidenetworks / bigbluetutor-client / client / React-Native / app / components / register.js View on Github external
this.state.dataRecord.whenReady(() => {
            if (!this.state.profileRecord.get("onboardingComplete")) {
              Actions.reset('onboard', {ds: this.props.ds, username: this.state.username, profileRecord: this.state.profileRecord, dataRecord: this.state.dataRecord, configurePush: this.props.configurePush});
            } else {
              var configurePush = this.props.configurePush.bind(this)
              configurePush()
              Actions.reset('drawer', {ds: this.props.ds, username: this.state.username, profileRecord: this.state.profileRecord, dataRecord: this.state.dataRecord, configurePush: this.props.configurePush});
              Actions.home({ds: this.props.ds, username: this.state.username, profileRecord: this.state.profileRecord, dataRecord: this.state.dataRecord, configurePush: this.props.configurePush});
            }
          })
        })
github rastapasta / foodsharing / src / sagas / session.tsx View on Github external
setTimeout(() => {
      Actions.reset('drawer')
      if (initial)
        Actions.jump(initial.scene, initial.props)

      SplashScreen.hide()
    }, 100)
github blindsidenetworks / bigbluetutor-client / client / React-Native / app / BigBlueTutor.js View on Github external
this.state.dataRecord.whenReady(() => {
                  if (!this.state.profileRecord.get("onboardingComplete")) {
                    Actions.onboard({ ds: this.state.ds, username: this.state.username, profileRecord: this.state.profileRecord, dataRecord: this.state.dataRecord, configurePush: this.configurePush});
                  } else {
                    this.configurePush();
                    Actions.reset('drawer', { ds: this.state.ds, username: this.state.username, profileRecord: this.state.profileRecord, dataRecord: this.state.dataRecord, configurePush: this.configurePush });
                    Actions.home({ ds: this.state.ds, username: this.state.username, profileRecord: this.state.profileRecord, dataRecord: this.state.dataRecord, configurePush: this.configurePush });
                  }
                })
              })
github Codebrahma / React-Native-Restaurant-App / app / components / RightHeaderButtons.js View on Github external
handleSignOut = () => {
    this.props.authLogout();
    Actions.reset('loginScreen');
  };
github skantus / react-native-firebase-redux-authentication / app / components / auth / SignupForm / signupForm.js View on Github external
componentDidUpdate(prevProps) {
    if (this.props.registered) Actions.reset('home');
  }