0

I'm creating a simple CRUD operation with Redux, but i'm not able to see the action in developer tools which i have created for Redux.

readAction.js

export const readAction = () => {
  return (dispatch) => {
    dispatch({
      type: 'READ_USER',
      data: [ { email: '[email protected]'}, { email: '[email protected]'}, { email: '[email protected]'} ]
    })
  }
}

readReducer.js

const initialState = {
  userData: [],
}

export const readReducer = (state = initialState, action = {}) => {
  //console.log(action)
  switch (action.type) {
    case 'READ_USER':
      return {
        ...state,
        userData: action.data
      }
    default:
      return state
  }
}

export default readReducer;

Developer tool in which i am not able to see the redux action enter image description here

Please review below whole sandbox working code.

codesandbox.io/embed/naughty-poincare-7tz02

1
  • you dont seem to be dispatching that action anywhere Commented Sep 26, 2019 at 10:10

1 Answer 1

1

Look like you didn't config window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__. Please check this link for more detail step by step

https://github.com/zalmoxisus/redux-devtools-extension

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.