Posts

Showing posts with the label redux-thunk

Redux action is working but reducer is not

Redux action is working but reducer is not Not sure why my reducer is not working. I have a console.log in my actions file. So for example, when I test out a failed login attempt, I see the console log in both the loginFromAPI function and loginFailure function (see in actions.js below) . These are outputting what is expected. But for some reason, the login reducer is not working. When I console.log in the loginReducer.js , I see nothing. This tells me that although the action is working, the reducer is not. My redux props do not change from the initial state (I've checked this by outputting to the console). I'd appreciate any help solving this issue. Here is the file structure: app reducers loginReducer.js rootReducer.js screens Login Login.js index.js actions.js store configureStore.js App.js actionTypes.js File configureStore.js configureStore.js import { createStore, applyMiddleware } from 'redux'; import a...