Questions tagged [next-redux-wrapper]
85 questions
1
vote
1 answer
NextJS: Do I need to use getInitialProps with next-redux-wrapper to share state to all pages?
I'm using next-redux-wrapper and dispatching actions from getServerSideProps from individual pages. But I realized that I can't access the populated store state from another page. If I try to, in either client-side or server-side, the state returns…

forest
- 1,312
- 3
- 20
- 47
1
vote
0 answers
access store of next-redux-wrapper from non component
I have a next app with next-redux-wrapper and my store code
import { createStore, applyMiddleware } from "redux";
import reducer from "./reducers";
import reduxThunk from "redux-thunk";
export default (initialState = undefined, { storeKey = "app"…

Abanoub Istfanous
- 856
- 9
- 24
1
vote
0 answers
Next-redux-wrapper with next-redux-saga: store being created twice
EDIT: It seems to be something with regards to the interaction between 'next-redux-saga' and the new version of 'redux-saga' -- I had patched 'next-redux-saga' locally so it would work with '1.0.0' but on reverting it and changing back to…

Cerulean
- 5,543
- 9
- 59
- 111
0
votes
0 answers
Next Js 13 (Redux)- Unhandled Runtime Error Error: could not find react-redux context value; please ensure the component is wrapped in a
Why am I getting an error in Next Js 13 when I use Redux ?
Error - And when I try to useDispatch somewhere I get this error - Unhandled Runtime Error
Error: could not find react-redux context value; please ensure the component is wrapped in a…
0
votes
0 answers
NextJs, Redux Toolkit, Next Redux Wrapper - reset state when navigator to new page
The problem I am facing can be described as follows:
I am using Next.js, Redux Toolkit, and Next Redux Wrapper. I have created a Redux slice with a state variable called "counter." Additionally, I have two pages named "test-1" and "test-2."
On…

Hai Nguyen
- 11
0
votes
0 answers
Cannot update a component while rendering a different component in NextJS, MUI, current solutions don't work
I build WebApp using NextJS, Mui, ReduxJs/Toolkit.
It works fine but getting warning when I try to navigate to the same page.
For example, I am on the Home page now and then click the Home link again.
Then I get the above warning.
When I navigate to…

Yuri R
- 311
- 2
- 9
0
votes
0 answers
getServerSideProps called on state change
I'm using getServerSideProps with next-redux-wrapper.
The issue is it invokes when I change the state on the button click.
as of my understanding, it should invoke only when we visit the page directly or navigate through the next link or route.
here…

yograj tandel
- 143
- 8
0
votes
0 answers
NextJS application fails after getting an update of different packages
I am new to NextJS and it would be a great help if someone can help me out here.
I have got an NextJS application which is working perfectly with some old version of node(12.15) but it is failing after the package.json is getting updated with some…
0
votes
1 answer
next-redux-wrapper, hydration action is not being run
I have the issue of hydration action not being run, resulting in my redux state in getServerSideProps to be initial instead of the current state that is on the client side
This is my set up for the store it uses redux-persist, react-redux,…

toster
- 1
- 2
0
votes
1 answer
Integrate next-redux-wrapper with redux-toolkit and RTK query
i made a looong research and i cant make a successful integration with next-redux-wrapper, redux-toolkit and rtk query.
i want to call getServerSideProps in the next component to load the userData, the thing is that i actually cant make something…

Lucas
- 27
- 6
0
votes
0 answers
make store is not a function next redux wrapper Next JS
I'm trying to implement next-redux-wrapper for one of my project. And facing issue to implement it correctly.
Below is my code store.js....
import { combineReducers, configureStore } from '@reduxjs/toolkit'
import { createWrapper } from…

Atal Shrivastava
- 674
- 1
- 9
- 35
0
votes
0 answers
Why do query parameters return wrong values in getServerSideProps method in Nextjs?
I have a nextjs project in which I use redux. Query values in getServerSideProps give wrong values in production environment.
export const getServerSideProps = wrapper.getServerSideProps(
(store) => async (context) => {
const { query, locale }…

Caner
- 504
- 3
- 17
0
votes
0 answers
wrapper.getInitialPageProps from next-redux-wrapper don't return the props to the component
I just updated my next-redux-wrapper package and did some changes according to their latest doc. However, the component didn't receive the props returned from MyComponent.getInitialProps = wrapper.getInitialPageProps(store => (context) => ({ foo:…

Ivan Yufen Stefanus
- 21
- 2
0
votes
1 answer
How to Move Next-Redux-Wrapper Store Provider to Layout Component?
Can you please help me move the next-redux-wrapper store provider into a layout component?
My current codes follows the next-redux-wrapper office docs and it works fine, but I would like to move the store provider into a layout component in case…

Mav33rick
- 21
- 5
0
votes
0 answers
Next.js RTK SSR Auth inside App.getInitialProps cause error when navigate: Cannot update a component X while rendering a different component (`App`)
When I implemented the logic of fetching the authenticated user and setting it to the Redux state inside the App.getInitialProps method and accessing that user from the state within any Next.js page, I encountered an error when navigating between…

monotype
- 217
- 2
- 10