How to use the react-native-router-flux.Reducer 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 CodeRabbitYu / react-native-template / app / Router.js View on Github external
const reducerCreate = params => {
    const defaultReducer = new Reducer(params);
    return (state, action) => {
        // console.log('ACTION:',action,Actions.currentScene)
        // console.log('Actions:', Actions);
        return defaultReducer(state, action);
    };
};
github shakacode / react-webpack-rails-tutorial / mobile / ReactNativeTutorial / app / setup / Router / Router.js View on Github external
const reducerCreate = params => {
  const defaultReducer = Reducer(params);
  return (state, action) => {
    console.log('Executing navigation action', action);
    return defaultReducer(state, action);
  };
};
github iZaL / insta-snap / src / Scenes.js View on Github external
const reducerCreate = params=>{
  const defaultReducer = Reducer(params);
  return (state, action)=>{
    console.log("ACTION:", action);
    return defaultReducer(state, action);
  }
};
github aksonov / react-native-router-native / Example / Example.js View on Github external
const reducerCreate = params => {
  const defaultReducer = new Reducer(params);
  return (state, action) => {
    console.log('ACTION:', action);
    return defaultReducer(state, action);
  };
};
github aksonov / react-native-router-flux / examples / react-native / Example.js View on Github external
const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: 'transparent',
    justifyContent: 'center',
    alignItems: 'center',
  },
  tabBarStyle: {
    backgroundColor: '#eee',
  },
  tabBarSelectedItemStyle: {
    backgroundColor: '#ddd',
  },
});

const defaultReducer = Reducer(Actions);
const reducerCreate = () => {
  return (state, action) => {
    console.log('reducer: ACTION:', action);
    return defaultReducer(state, action);
  };
};

const stateHandler = (prevState, newState, action) => {
  console.log('onStateChange: ACTION:', action);
};

const getSceneStyle = () => ({
  backgroundColor: '#F5FCFF',
  shadowOpacity: 1,
  shadowRadius: 3,
});
github aksonov / react-native-router-flux / examples / react-native / Example.js View on Github external
const reducerCreate = params => {
  const defaultReducer = new Reducer(params);
  return (state, action) => {
    console.log('reducer: ACTION:', action);
    return defaultReducer(state, action);
  };
};
github iZaL / insta-snap / src / App.js View on Github external
const reducerCreate = params=>{
  const defaultReducer = Reducer(params);
  return (state, action)=> {
    //console.log('ACTION:', action);
    return defaultReducer(state, action);
  };
};
github iZaL / my-appointment / src / App.js View on Github external
const reducerCreate = params=> {
  const defaultReducer = Reducer(params);
  return (state, action)=>{
    return defaultReducer(state, action);
  }
};
github philipshurpik / react-native-starter-kit / app / Routes.js View on Github external
const reducerCreate = params => (state, action) => Reducer(params)(state, action);
github guangqiang-liu / OneM / src / containers / App.js View on Github external
const reducerCreate = params => {
  const defaultReducer = new Reducer(params)
  return (state, action) => {
    action.type !== type.REACT_NATIVE_ROUTER_FLUX_SET_PARAMS ? dispatch(state)(action) : null
    return defaultReducer(state, action)
  }
}