getServerSideProps in redux-saga example in Next.js repo
See original GitHub issueI try to use the getServerSideProps
in redux-saga example.
If I just replace getStaticProps
with getServerSideProps
, then my code does not work - placeholderData
is not loaded.
Why does the example stop working after the replacement?
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Data Fetching: getServerSideProps - Next.js
API reference for `getServerSideProps`. Learn how to fetch data on each request with Next.js.
Read more >how to use typescript, next-redux-wrapper, getServerSideProps?
Here is one solution, based on the next-redux-wrapper docs: ... title="Home | Next.js + TypeScript Example"> <h1>Hello Next.js </h1> <p> ...
Read more >Next.js With Redux Saga Example - StackBlitz
Run official live example code for Next.js With Redux Saga, created by Vercel on StackBlitz. ... repository-url=https://github.com/vercel/next.js/tree/.
Read more >Redux Wrapper for Next.js - Morioh
Each time when pages that have getStaticProps or getServerSideProps are opened by user ... Or like this (from with-redux-wrapper example in Next.js repo):...
Read more >How to use Redux in Next.js - LogRocket Blog
For this reason, many projects that use Next.js want to take ... or the getStaticProps or the getServerSideProps functions are called, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@edshav you can try the updated version in with-redux-saga @ nextjs repo
// 2. Stop the saga if on server
if (ctx.req) {
ctx.store.dispatch(END);
await (ctx.store as SagaStore).sagaTask?.toPromise();
}
comment above code at _app.js will work.