f / f/react-wait

is it compatible with nextjs and server rendering?

Open
#7 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
306
Forks
28
PR merge metrics
No merged PRs in 30d

Description

Hello could you tell me if it compatible with nextjs and server rendering?

I'm getting an error n.useState is not a function

TypeError: n.useState is not a function
at exports.Waiter (/app/node_modules/react-wait/dist/react-wait.js:23:13)
at processChild (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:2475:14)
at resolve (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:2401:5)
at ReactDOMServerRenderer.render (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:2728:22)
at ReactDOMServerRenderer.read (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:2699:25)
at renderToString (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:3113:25)
at renderPage (/app/node_modules/next/dist/server/render.js:319:26)
at Function.getInitialProps (/app/node_modules/next/dist/server/document.js:65:25)
at _callee$ (/app/node_modules/next/dist/lib/utils.js:86:30)
at tryCatch (/app/node_modules/@babel/runtime-corejs2/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/app/node_modules/@babel/runtime-corejs2/node_modules/regenerator-runtime/runtime.js:288:22)
at Generator.prototype.(anonymous function) [as next] (/app/node_modules/@babel/runtime-corejs2/node_modules/regenerator-runtime/runtime.js:114:21)
at asyncGeneratorStep (/app/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:5:24)
at _next (/app/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:27:9)
at /app/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:34:7
at new Promise ()

I'm using nextjs version 7.0.2

or something different can cause this error?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported server-rendering failure with Next.js 7.0.2 and inspect node_modules/react-wait/dist/react-wait.js at the stack-trace location. Compare the React and ReactDOM versions involved, then establish whether the SSR case is supported; done means the cause and compatibility status are verified and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nextjs, react
Domain
frontend, web-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.