How to use the react-native-router-flux.Actions.main 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 iZaL / my-appointment / src / containers / Auth / Login.js View on Github external
handleForgotPasswordRoute() {
    // @todo: implement route
    return Actions.main();
  }
github AOSSIE-Org / CarbonFootprint-Mobile / app / actions / SimpleAction.js View on Github external
async function firebaseSignup(email, pass) {
    try {
        await firebase.auth().createUserWithEmailAndPassword(email, pass);
        alert("Account created");
        // Navigate to the Home page, the user is auto logged in
        Actions.main({type: ActionConst.RESET});
        Actions.calculate();
        // Storing user's email in Local storage by dispatching setStorage action 
        dispatch(setStorage(email));
        return true;
    } catch (error) {
        alert(error.toString());
        return false;
    }
}
github rexlow / Devent / src / containers / SplashScreen.js View on Github external
processAuth(props) {
    if(props.auth.user != null) {
      if(props.auth.user.uid) {
        Actions.main({ type: 'reset' });
      }else{
        Actions.login({ type: 'reset' });
      }
    }
  }
github smalltide / react-native-dva-antd-manager / src / actions / AuthActions.js View on Github external
const loginUserSuccess = (dispatch, user) => {
  dispatch({
    type: LOGIN_USER_SUCCESS,
    payload: user
  });

  Actions.main();
};
github AOSSIE-Org / CarbonFootprint-Mobile / app / actions / AuthAction.js View on Github external
.then(user => {
                        dispatch(loaderToggle());
                        dispatch(receiveAuth(user));
                        Actions.main({ type: ActionConst.REPLACE });
                    })
                    .catch(error => {
github smalltide / react-native-dva-antd-manager / src / models / Employee.js View on Github external
firebase.auth().onAuthStateChanged((user) => {
        if (user) {
          doWatchList((val) => {
            dispatch({ type: 'fetchSuccess', payload: val });
          });
          Actions.main();
        } else {
          Actions.auth();
        }
      });
    }