Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey

All Questions

2 votes
1 answer
3k views

How to use redux for data fetching in Next.js

So previously I migrated my code to use Redux in my Next.js project and I immediately ran into some issues with it. Basically I used to fetch data from getServerSideProps() in the previous version. ...
Dev-Siri's user avatar
  • 741
4 votes
1 answer
1k views

empty state in next-redux-wrapper

i've been having troble getting my nextjs app to work with getServerSideProps() for server-side-rednering. i tried implemening next-redux-wrapper but the state is empty. *note: redux works fine while ...
shanksu 218's user avatar
1 vote
1 answer
3k views

How to access updated redux store state in getServerSideProps next js?

I'm trying to get the latest redux state in getServerSideProps like this : export const getServerSideProps = async (ctx) => { const state = store.getState(); console.log(state.name); ...
user avatar
0 votes
1 answer
2k views

react-snap is not rendering html on the page

I am trying to render html on the page as source code by using react-snap plugin, with the following configuration in package.json package.json { ..// "scripts": { "test": &...
Muhammad Owais's user avatar
2 votes
0 answers
325 views

Uncaught (in promise) Error: export not found at resolve (requireUniversalModule.js:90)

I am running my frontend code in react and doing server-side rendering using express. Recently i did some changes and committed to my branch, mostly related to redux and updated my store.js file. ...
sidverma's user avatar
  • 1,185
1 vote
0 answers
438 views

React SSR export default component

I'm developing react js server side rendered application.I have category.js inside my Home.js and i want to do ssr for those two files as well. Home.js import React, { Component } from 'react'; ...
Tje123's user avatar
  • 751
4 votes
0 answers
8k views

Expected server HTML to contain a matching <div> in Server side rendering

I am new in server side rendering. I am trying to implement it like following but, it shows error. index.html <!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" ...
ketan's user avatar
  • 19.4k
1 vote
0 answers
310 views

Cannot read property 'injectReducers' of undefined

I'm trying to load reducers in async. I am following this tutorial, but for some reason the store in the onLoad at react-universal-component is undefined. src/routes.js line 5 - {store: undefined, ...
Mr A's user avatar
  • 1,377
16 votes
4 answers
11k views

Using redux with redux-persist with server-side rendering

I am trying to implement redux 4.0.0 with redux-persist 5.10.0 in an SSR application and am running into an issue where I cannot properly supply createStore() with the preloaded state without the app ...
Gurnzbot's user avatar
  • 4,182
0 votes
1 answer
289 views

Why react-router-config not found?

I'm trying to do Server side rendering for my React Js App.I'm following this course from Udemy When i tried to import renderRoutes from react-router-config into my client.js file,it showing bellow ...
Tje123's user avatar
  • 751
2 votes
0 answers
376 views

Faster serialization / deserialization of object data in Javascript?

I'm doing server-side rendering using and React/Redux. To pass Redux data to the front end, I'm serializing it to JSON in a script tag thats hydrated on the client in the head: <script>window....
Allyl Isocyanate's user avatar
0 votes
1 answer
980 views

react-router doesn't render components on server side

I using react-router and server side rending . but my server side not work with router . it change URL but doesn't render components My server side code: import express from 'express'; import cors ...
nghiep nguyen tien's user avatar
0 votes
1 answer
282 views

'Functions are not valid as a React child' when trying to dynamically include Components for SSR bundle

From my express route I'm trying to pass a component to use in a render function, that handles SSR. Express Route: import SettingsConnected from '../../../client/components/settings/settings-...
Harry Lincoln's user avatar
0 votes
0 answers
291 views

React-router, Redux, server-side rendering : Invariant Violation: Browser history needs a DOM

I'm a newbie in server-side rendering. My stack is mainly: Webpack, React, React-Router, Redux, Babel. The creation of bundle works great. But when I open my browser I get this error : Invariant ...
Diagathe Josué's user avatar
1 vote
0 answers
538 views

How to get resultsState of react-instantsearch correctly with server-side render and integration with redux store

I try to get resultsState by call react-instantsearch's findResultsState API, But can't integrate with the component already connected with redux store. Error will show like below. Invariant ...
Albert Fang's user avatar

15 30 50 per page