Skip to main content

All Questions

0 votes
2 answers
313 views

Next.js Redux with redux-persist hydration error

I got Next.js application with Typescript and I'm trying to make redux work with redux-persist, if the state in slice is same as the initial state, the application works fine, but if it actually have ...
Jakub Hampl's user avatar
1 vote
1 answer
684 views

Next.js + RTK Query: How do I integrate server side rendering with RTK data fetching?

I want to render a static listing with cached HTML on initial page load using data that was fetched server side. I do NOT want to display a loading indicator on initial page load. I want to display ...
Daniel Tonon's user avatar
  • 10.5k
2 votes
1 answer
142 views

Next.js 14 Redux 5 - TypeError: store.getState is not a function

I have this error: How to fix this. What did I do wrong? I'm using Next.js 14. /store/index.js import { configureStore } from '@reduxjs/toolkit' import cartReducer from './cartSlice'; export const ...
TeeTouch Asawasupakul's user avatar
1 vote
1 answer
217 views

How to initialize store from ssr data?

I'm working on a Next.js project organized into directories, and I'm also implementing Redux for client-side state management. I have pages located in the app directory t. Additionally, I'm fetching ...
Shivank Anchal's user avatar
1 vote
1 answer
173 views

Can't extract data from Redux Toolkit 2.0 in my NextJS 14 app

I am creating a NextJs 14 ecommerce application using redux toolkit for state management. I have created a slice using my best understanding of RTK 2.0 syntax to call user data so that it can be ...
Leslie W.'s user avatar
1 vote
1 answer
114 views

Call React-Redux dispatch function from non function component while using wrapper

I have a React-Redux store which is wrapped in a next-redux-wrapper. I want to dispatch a function outside of react component but I am unable to do so because of the wrapper. Is there a way to import ...
Ankit Shah's user avatar
  • 1,345
0 votes
1 answer
227 views

How to warp dynamic routes in Nextjs and Redux

I am trying to warp my dynamic route with Redux provider but it's telling me that my component should be warp with Redux provider which I already did. I am using Next.js 13.5 My layout.tsx for dynamic ...
boyenec's user avatar
  • 1,637
0 votes
1 answer
46 views

Don't understand how to use Redux in NextJS 13. The "(0 , _react.createContext) is not a function" error

I have this structure in my root layout export default function RootLayout({ children }) { const dispatch = useDispatch(); useEffect(() => { dispatch(fetchProducts()); }, [dispatch]) ...
DanieLSh's user avatar
0 votes
0 answers
37 views

Redux implementation in search prompt

I have a problem with my application. On my page there are several components, Header.jsx, Hero.jsx, Footer etc. In Header I have implemented the search bar and it displays dynamic response, when I ...
Adnan Sk's user avatar
-1 votes
1 answer
216 views

Can't access directly to my redux store outside component

I need to access to my store outside component (from a classic function), but when I try to call getState(), I have an error: Property 'getState' does not exist on type '(initialState: any) => any'...
niskah-media's user avatar
0 votes
0 answers
743 views

Redux Persist not working after page reload or refresh

I was using react-toolkit but then decided to use redux-persist in order to persist my user reducer (ie my user data, like the access token and info), but when i added the redux persist and followed ...
Brightcode's user avatar
0 votes
1 answer
713 views

RTK Query refresh cached data when other clients change it

I'm building a NextJS application for a small company. This application consists of a dashboard used by the 10 employees of this company and functions as an ERP. We have an API that provides ...
jgsneves's user avatar
0 votes
0 answers
108 views

Error: A state mutation is detected between two dispatches in NEXTJS

I'm using redux and web3auth with nextjs. But i'm encountering state mutation error in many places. this codebase used to work properly on reactjs. This error occurs sometimes and don't let me proceed ...
jakia.amin's user avatar
5 votes
2 answers
4k views

If i use Redux in NextJS 13, will it be still server-side project?

I want to use Redux in NextJS 13 project (app folder structure) . But for use it i need use provider, and provider will be in layout.jsx. But for use provider, i need use "use client"; ...
Uğurcan Uçar's user avatar
0 votes
0 answers
29 views

Is redux state only "ultimately updated" like useState? [duplicate]

I have learned the hard way that state in useState is "ultimately updated" and the current value of it may not be the most latest. But does this happen with redux state as well? If I have ...
Sourabh Yadav's user avatar

15 30 50 per page
1
2 3 4 5
9