Questions tagged [next-redux-wrapper]

85 questions
0
votes
1 answer

redux-persist resets the state when updating the page

I use redux-persist in my Next js project. The status is saved in localStorage when the store is changed, but it is reset when the page is changed. What could be the problem? One of the reduser. I'm not sure, but maybe this problem is caused by…
0
votes
0 answers

next-redux-wrapper wrapper.getServerSlideProps error

On my index.tsx page where i shoud get tracks from server: ` export const getServerSideProps = wrapper.getServerSideProps(async ({store}) => { const dispatch = store.dispatch as NextThunkDispatch await dispatch(await…
0
votes
1 answer

Why next-redux-wrapper hydrate twice in logger?

I am getting stuck in using next-redux-wrapper with nextjs and I want to clarify concept between server and client about Hydrate. Recently I start to learn nextjs with next-redux-wrapper and redux-toolkit packages and I false the reactStrictMode,…
tommychoo
  • 611
  • 2
  • 11
  • 20
0
votes
0 answers

How to Call API In NextJS Using Redux With SSR?

Need One Help i am trying to call api in nextjs using redux(Here,SSR is not possible) and getServerSideProps(Here, SSR is Possible but without redux) in both case API Called Successfully. If i used it individually bot are working well but now i want…
0
votes
1 answer

next-redux-wrapper HYDRATION failed

I am trying to integrate next-redux-wrapper to Next.js RTK project. When invoking async action from getServerSideProps, I am getting state mismatch error (see the image below). When I dispatch action from client side (increment/decrement),…
Alex
  • 27
  • 1
  • 12
0
votes
1 answer

Would it be more productive to use await Promis.all() instead of await somePromis?

I use nextjs in conjunction with next-redux-wrapper and for seo pages I dispatch actions as described in the documentation for asynchronous actions: export const getServerSideProps = wrapper.getServerSideProps( (store) => async ({ locale,…
UKRman
  • 404
  • 3
  • 16
0
votes
1 answer

How to share state between nextjs pages with next-redux-wrapper?

I have this home page const Home: NextPage = () => { return (<> Go to page 2 ) } Home.getInitialProps = wrapper.getInitialPageProps( ({ dispatch }) => async () => { await…
relidon
  • 2,142
  • 4
  • 21
  • 37
0
votes
0 answers

Can Next.js handle both Redux Saga and React Intl? Element type is invalid: expected a string or a class/function

I am trying to convert an old, unmantained but complex vanilla React app in a Next.js app (please note I am quite a newbie at his first job as a developer). The problem is when it comes to implement both redux-saga and react-intl in Next.js. I am…
0
votes
0 answers

next-redux-wrapper lose all state after doing ServerSideProps

i am losing all the state when i call serversideprops with next-redux-wrapper , the problem that when we go to another page the state dont persist , any solution please ? this is the code ( we are using next": "12.2.3", "redux": "^4.2.0",…
Mike Owen
  • 1
  • 1
0
votes
0 answers

Hydrate getting called multiple times with Redux Toolkit and next-redux-wrapper

I am trying to add redux to Next.js. It is not working Ok This is my reducerSlice file import { createSlice } from '@reduxjs/toolkit'; import { HYDRATE } from 'next-redux-wrapper'; import { AppState } from '..'; export const ProfileSlice =…
0
votes
0 answers

Set-Cookie header from NestJS server not accepted by fetchBaseQuery when using Next.js SSR

I'm trying to do authorization using JWT access&refresh tokens (Next.js SSR + Redux Toolkit RTK Query + NestJS). When I receive a response from the server on the client (for example using Postman) the cookies sent by the server are saved. But when I…
0
votes
1 answer

next-redux-wrapper Generic type 'MakeStore' requires 1 type argument(s) in configureStore

Error on MakeStore saying Generic type 'MakeStore' requires 1 type argument(s) .ts(2314) configureStore.ts is the following: import { configureStore, EnhancedStore, getDefaultMiddleware, } from '@reduxjs/toolkit'; import { MakeStore } from…
Abdul Mahamaliyev
  • 750
  • 1
  • 8
  • 20
0
votes
0 answers

Hydration payload is incorrect after dispatching a thunk

I'm using next-redux-wrapper, and on my wrapper.getServersideProps I'm dispatching a thunk, but during hydration it's action returns a payload of same value of initial state. Why? My Thunk: export const fetchData = createAsyncThunk( …
Kevin Bryan
  • 1,846
  • 2
  • 22
  • 45
0
votes
1 answer

Client side state is not hydrated from server on page reload

The client-side state is not hydrated from the server after creating a new store CodeSandBox Link - https://codesandbox.io/s/vibrant-aryabhata-l29r2b Steps to reproduce the behavior: Run the app on the link above. Login with any…
Gaurav
  • 1,668
  • 1
  • 13
  • 30
0
votes
1 answer

When routing mswjs/data populates the database with new items and removes the previous one, making it inaccessible

I use next-redux-wrapper, MSW, @mswjs/data and redux-toolkit for storing my data in a store as well as mocking API calls and fetching from a mock Database. I have the following scenario happening to me. I am on page /content/editor and in the…
Mähnenwolf
  • 720
  • 10
  • 30