NextJS getStaticProps, getServerSideProps not currently work with redux-observable

Viewed 147

getStaticProps, getServerSideProps not currently work with redux-observable

When am going to dispatch action from getServerSideProps it's fired and getting data but not updating redux reducer state, am using next-redux-observable.

getServerSideProps:

export const getServerSideProps = wrapper.getServerSideProps(store => async ({ req }) => {
  store.dispatch(loadUsers())
});

Action:

export const loadUsers = () => ({ type: USER_CONST.LIST_LOAD })

One more issue I have found is, HYDRATE is in action first and after that reducers are going to be updated, but the component doesn't find the state.

0 Answers
Related