Questions tagged [next-redux-wrapper]
85 questions
0
votes
2 answers
Why can't i map this array of objects within an object
Hi guy's i've been working with next.js, redux and sanity.io. It's been awful... Lol
Anyways here's the code i'm stuck with
ServiceCards.js
import React from 'react';
import { useSelector } from 'react-redux';
import { getNavItems } from…

Tjs90
- 61
- 1
- 10
0
votes
0 answers
How to access store when server-side rendering in NextJS?
I'm trying to get redux store when server-side rendering.
But I cannot find store in page component's getinitialProps.
//store/index.ts
import { applyMiddleware, createStore, compose } from 'redux';
import { createWrapper } from…

a_lady_on_fire
- 11
- 5
0
votes
1 answer
Did I correctly understand the behaviour of next-redux-wrapper?
Tried to make counter with next-redux-wrapper, redux, Next.js.
I've watched that when I clicked few counter button, then move to other page and came back to counter page, getServerSideProps initializes the counter into 3 again. I understand this…

홍우지
- 335
- 1
- 9
0
votes
1 answer
Next.js: getServerSideProps not working using Next.js with Next-redux-wrapper with TypeScript
When I'm trying to dispatch action as in documentation from the getServerSideProps using next-redux-wrapper store and redux-thunk i keep getting the following typescript error:
ts(2322): Type '({ req }: GetServerSidePropsContext) =>…

hakuu1251
- 1
- 1
0
votes
1 answer
next-redux-wrapper Wrapper.getStaticProps not working with
This is my backend controller, I am getting the rooms data
const allRooms = catchAsyncErrors(async (req, res) => {
const resPerPage = 4;
const roomsCount = await Room.countDocuments();
const apiFeatures = new APIFeatures(Room.find(),…

Kennedy Daniel
- 57
- 6
0
votes
1 answer
NextJS - How to combine two getServerSideProps wrappers?
I am using next-iron-session and next-redux-wrapper in my nextjs client.
Both of them require me to wrap getServerSideProps with their respective functions.
Does somebody know, how I can chain the wrappers ?
next-iron-session (individual)
export…

drag98
- 37
- 1
- 6
0
votes
0 answers
next-redux-wrapper funtion: withRedux() raises a Warning
my project is using react,redux,next.js && next-redux-wrapper
I am pretty new to next js and I've to wrapped the redux store around the whole app using next-redux-wrapper
everything works as expected but I am getting a warning on the console.
is…

EliyaMelamed
- 276
- 2
- 8
- 22
0
votes
1 answer
Typescript Warning for next-redux-wrapper regarding state not found and not assignable to types
Im using next-redux-wrapper and I get following 2 type errors. Anyone encounter this before and how do you solve it? All else, the code is working and i can see my state in my redux-devtools-extension. Thanks
import { useSelector } from…

Hendry Lim
- 1,929
- 2
- 21
- 45
0
votes
1 answer
NextJS: `HYDRATION` action doesn't receive server payload when using `redux-observable`
Packages:
redux-observable@2.0.0-rc.2
rxjs latest
universal-rxjs-ajax dev branch
next-redux-wrapper latest
next.js latest
I have a simple Page with getStaticProps:
export const getStaticProps = wrapper.getStaticProps((store) => async (ctx) => {
…

PYTHON DEVELOPER999
- 301
- 2
- 12
0
votes
1 answer
Unable to fetch data from server due to serialization problem using NextJS?
I'm currently using axios and NextJS.
I currently have this code in my component:
export async function getServerSideProps(context) {
const data = await getVideo(context.query.id);
console.log('data: ', data);
// console.log('context: ',…

Kirasiris
- 523
- 10
- 37