I'm using React Native with Redux and React Native Router Flux but I'm getting the following error "_reactNativeRouterFlux.Actions.create is not a function" I followed the docs on the correct setup not sure what's going on
routes reducer
import { ActionConst } from 'react-native-router-flux';
const initialState = {
scene: {},
};
export default function routesReducer(state = initialState, action = {}) {
switch (action.type) {
// focus action is dispatched when a new screen comes into focus
case ActionConst.FOCUS:
return {
...state,
scene: action.scene,
};
// ...other actions
default:
return state;
}
}
index reducer
export default combineReducers({
//Scenes,
routesReducer,
oauth: oauthReducer,
navBar: navReducer,
});
my store
const enhancer = compose(
applyMiddleware(
thunk,
),
);
const store = createStore(
reducers,
enhancer,
autoRehydrate(),
);
app index
// I have the correct imports
const ConnectedRouter = connect()(Router);
import { scenes } from "../app/config/Router";
render() {
return (
<Provider store={store} >
<ConnectedRouter scenes={scenes} />
</Provider>
);
}
my routes
export const scenes = Actions.create(
<Scene key="root">
<Scene key="login" component={Login} />
</Scene>
);