-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TypeError in with-graphql-hooks example #9658
Fix TypeError in with-graphql-hooks example #9658
Conversation
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
buildDuration | 13.8s | 13.8s | |
nodeModulesSize | 46.8 MB | 46.8 MB |
Client Bundles (main, webpack, commons)
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
main-HASH.js | 18.3 kB | 18.3 kB | ✓ |
main-HASH.js gzip | 6.44 kB | 6.44 kB | ✓ |
webpack-HASH.js | 1.53 kB | 1.53 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
16b1a7225520..10012f496.js | 20 kB | 20 kB | ✓ |
16b1a7225520..f496.js gzip | 7.42 kB | 7.42 kB | ✓ |
4952ddcd88e7..49d7903c2.js | 9.61 kB | 9.61 kB | ✓ |
4952ddcd88e7..03c2.js gzip | 3.77 kB | 3.77 kB | ✓ |
commons.HASH.js | 10.4 kB | 10.4 kB | ✓ |
commons.HASH.js gzip | 3.91 kB | 3.91 kB | ✓ |
de003c3a9d30..a5a0ede39.js | 21.2 kB | 21.2 kB | ✓ |
de003c3a9d30..de39.js gzip | 8.19 kB | 8.19 kB | ✓ |
framework.HASH.js | 126 kB | 126 kB | ✓ |
framework.HASH.js gzip | 39.5 kB | 39.5 kB | ✓ |
Overall change | 207 kB | 207 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
main-HASH.module.js | 14.2 kB | 14.2 kB | ✓ |
main-HASH.module.js gzip | 5.36 kB | 5.36 kB | ✓ |
webpack-HASH.module.js | 1.53 kB | 1.53 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
16b1a7225520..e5.module.js | 21.2 kB | 21.2 kB | ✓ |
16b1a7225520..dule.js gzip | 8.18 kB | 8.18 kB | ✓ |
4952ddcd88e7..cc.module.js | 11.9 kB | 11.9 kB | ✓ |
4952ddcd88e7..dule.js gzip | 4.42 kB | 4.42 kB | ✓ |
de003c3a9d30..80.module.js | 15 kB | 15 kB | ✓ |
de003c3a9d30..dule.js gzip | 6.15 kB | 6.15 kB | ✓ |
framework.HASH.module.js | 126 kB | 126 kB | ✓ |
framework.HA..dule.js gzip | 39.4 kB | 39.4 kB | ✓ |
Overall change | 189 kB | 189 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
polyfills-HASH.js | 15.3 kB | 15.3 kB | ✓ |
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 15.3 kB | 15.3 kB | ✓ |
Client Pages
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
_app.js | 2.93 kB | 2.93 kB | ✓ |
_app.js gzip | 1.33 kB | 1.33 kB | ✓ |
_error.js | 13.2 kB | 13.2 kB | ✓ |
_error.js gzip | 5.11 kB | 5.11 kB | ✓ |
hooks.js | 1.92 kB | 1.92 kB | ✓ |
hooks.js gzip | 943 B | 943 B | ✓ |
index.js | 318 B | 318 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js | 6.78 kB | 6.78 kB | ✓ |
link.js gzip | 2.89 kB | 2.89 kB | ✓ |
routerDirect.js | 413 B | 413 B | ✓ |
routerDirect.js gzip | 285 B | 285 B | ✓ |
withRouter.js | 423 B | 423 B | ✓ |
withRouter.js gzip | 284 B | 284 B | ✓ |
Overall change | 26 kB | 26 kB | ✓ |
Client Pages Modern
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
_app.module.js | 1.53 kB | 1.53 kB | ✓ |
_app.module.js gzip | 745 B | 745 B | ✓ |
_error.module.js | 10.3 kB | 10.3 kB | ✓ |
_error.module.js gzip | 4.24 kB | 4.24 kB | ✓ |
hooks.module.js | 651 B | 651 B | ✓ |
hooks.module.js gzip | 371 B | 371 B | ✓ |
index.module.js | 276 B | 276 B | ✓ |
index.module.js gzip | 212 B | 212 B | ✓ |
link.module.js | 5.45 kB | 5.45 kB | ✓ |
link.module.js gzip | 2.46 kB | 2.46 kB | ✓ |
routerDirect.module.js | 386 B | 386 B | ✓ |
routerDirect..dule.js gzip | 275 B | 275 B | ✓ |
withRouter.module.js | 396 B | 396 B | ✓ |
withRouter.m..dule.js gzip | 274 B | 274 B | ✓ |
Overall change | 19 kB | 19 kB | ✓ |
Client Build Manifests
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
_buildManifest.js | 244 B | 244 B | ✓ |
_buildManifest.js gzip | 200 B | 200 B | ✓ |
_buildManifest.module.js | 251 B | 251 B | ✓ |
_buildManife..dule.js gzip | 209 B | 209 B | ✓ |
Overall change | 495 B | 495 B | ✓ |
Rendered Page Sizes
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
index.html | 4.06 kB | 4.06 kB | ✓ |
index.html gzip | 1.03 kB | 1.03 kB | ✓ |
link.html | 4.58 kB | 4.58 kB | ✓ |
link.html gzip | 1.11 kB | 1.11 kB | ✓ |
withRouter.html | 4.59 kB | 4.59 kB | ✓ |
withRouter.html gzip | 1.1 kB | 1.1 kB | ✓ |
Overall change | 13.2 kB | 13.2 kB | ✓ |
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
buildDuration | 14.1s | 14.7s | |
nodeModulesSize | 46.8 MB | 46.8 MB |
Client Bundles (main, webpack, commons)
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
main-HASH.js | 18.3 kB | 18.3 kB | ✓ |
main-HASH.js gzip | 6.44 kB | 6.44 kB | ✓ |
webpack-HASH.js | 1.53 kB | 1.53 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
16b1a7225520..10012f496.js | 20 kB | 20 kB | ✓ |
16b1a7225520..f496.js gzip | 7.42 kB | 7.42 kB | ✓ |
4952ddcd88e7..49d7903c2.js | 9.61 kB | 9.61 kB | ✓ |
4952ddcd88e7..03c2.js gzip | 3.77 kB | 3.77 kB | ✓ |
commons.HASH.js | 10.4 kB | 10.4 kB | ✓ |
commons.HASH.js gzip | 3.91 kB | 3.91 kB | ✓ |
de003c3a9d30..a5a0ede39.js | 21.2 kB | 21.2 kB | ✓ |
de003c3a9d30..de39.js gzip | 8.19 kB | 8.19 kB | ✓ |
framework.HASH.js | 126 kB | 126 kB | ✓ |
framework.HASH.js gzip | 39.5 kB | 39.5 kB | ✓ |
Overall change | 207 kB | 207 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
main-HASH.module.js | 14.2 kB | 14.2 kB | ✓ |
main-HASH.module.js gzip | 5.36 kB | 5.36 kB | ✓ |
webpack-HASH.module.js | 1.53 kB | 1.53 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
16b1a7225520..e5.module.js | 21.2 kB | 21.2 kB | ✓ |
16b1a7225520..dule.js gzip | 8.18 kB | 8.18 kB | ✓ |
4952ddcd88e7..cc.module.js | 11.9 kB | 11.9 kB | ✓ |
4952ddcd88e7..dule.js gzip | 4.42 kB | 4.42 kB | ✓ |
de003c3a9d30..80.module.js | 15 kB | 15 kB | ✓ |
de003c3a9d30..dule.js gzip | 6.15 kB | 6.15 kB | ✓ |
framework.HASH.module.js | 126 kB | 126 kB | ✓ |
framework.HA..dule.js gzip | 39.4 kB | 39.4 kB | ✓ |
Overall change | 189 kB | 189 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
polyfills-HASH.js | 15.3 kB | 15.3 kB | ✓ |
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 15.3 kB | 15.3 kB | ✓ |
Client Pages
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
_app.js | 2.93 kB | 2.93 kB | ✓ |
_app.js gzip | 1.33 kB | 1.33 kB | ✓ |
_error.js | 13.2 kB | 13.2 kB | ✓ |
_error.js gzip | 5.11 kB | 5.11 kB | ✓ |
hooks.js | 1.92 kB | 1.92 kB | ✓ |
hooks.js gzip | 943 B | 943 B | ✓ |
index.js | 318 B | 318 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js | 6.78 kB | 6.78 kB | ✓ |
link.js gzip | 2.89 kB | 2.89 kB | ✓ |
routerDirect.js | 413 B | 413 B | ✓ |
routerDirect.js gzip | 285 B | 285 B | ✓ |
withRouter.js | 423 B | 423 B | ✓ |
withRouter.js gzip | 284 B | 284 B | ✓ |
Overall change | 26 kB | 26 kB | ✓ |
Client Pages Modern
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
_app.module.js | 1.53 kB | 1.53 kB | ✓ |
_app.module.js gzip | 745 B | 745 B | ✓ |
_error.module.js | 10.3 kB | 10.3 kB | ✓ |
_error.module.js gzip | 4.24 kB | 4.24 kB | ✓ |
hooks.module.js | 651 B | 651 B | ✓ |
hooks.module.js gzip | 371 B | 371 B | ✓ |
index.module.js | 276 B | 276 B | ✓ |
index.module.js gzip | 212 B | 212 B | ✓ |
link.module.js | 5.45 kB | 5.45 kB | ✓ |
link.module.js gzip | 2.46 kB | 2.46 kB | ✓ |
routerDirect.module.js | 386 B | 386 B | ✓ |
routerDirect..dule.js gzip | 275 B | 275 B | ✓ |
withRouter.module.js | 396 B | 396 B | ✓ |
withRouter.m..dule.js gzip | 274 B | 274 B | ✓ |
Overall change | 19 kB | 19 kB | ✓ |
Client Build Manifests
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
_buildManifest.js | 244 B | 244 B | ✓ |
_buildManifest.js gzip | 200 B | 200 B | ✓ |
_buildManifest.module.js | 251 B | 251 B | ✓ |
_buildManife..dule.js gzip | 209 B | 209 B | ✓ |
Overall change | 495 B | 495 B | ✓ |
Serverless bundles
zeit/next.js canary | supaspoida/next.js fix-with-graphql-hooks-example | Change | |
---|---|---|---|
_error.js | 256 kB | 256 kB | ✓ |
_error.js gzip | 67.9 kB | 67.9 kB | ✓ |
hooks.html | 4.19 kB | 4.19 kB | ✓ |
hooks.html gzip | 1.07 kB | 1.07 kB | ✓ |
index.js | 256 kB | 256 kB | ✓ |
index.js gzip | 68 kB | 68 kB | ✓ |
link.js | 289 kB | 289 kB | ✓ |
link.js gzip | 77.2 kB | 77.2 kB | ✓ |
routerDirect.js | 282 kB | 282 kB | ✓ |
routerDirect.js gzip | 75.2 kB | 75.2 kB | ✓ |
withRouter.js | 282 kB | 282 kB | ✓ |
withRouter.js gzip | 75.3 kB | 75.3 kB | ✓ |
Overall change | 1.37 MB | 1.37 MB | ✓ |
Commit: 675f703
675f703
to
fe994a5
Compare
Stats from current PRDefault Server ModeGeneral
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Rendered Page Sizes
Serverless ModeGeneral
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Serverless bundles
Commit: fe994a5 |
@@ -1,7 +1,7 @@ | |||
import Link from 'next/link' | |||
import { withRouter } from 'next/router' | |||
|
|||
const Header = ({ router: { pathname } }) => ( | |||
const Header = ({ pathname }) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
withRouter
injects the router
key though 🤔
fe994a5
to
bf9d7a4
Compare
Stats from current PRDefault Server ModeGeneral
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Rendered Page Sizes
Serverless ModeGeneral
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Serverless bundles
Commit: bf9d7a4 |
@@ -23,7 +23,7 @@ export default App => { | |||
// Run all GraphQL queries | |||
graphQLState = await getInitialState({ | |||
App: ( | |||
<App | |||
<AppTree | |||
{...appProps} | |||
Component={Component} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Component={Component} |
@@ -23,7 +23,7 @@ export default App => { | |||
// Run all GraphQL queries | |||
graphQLState = await getInitialState({ | |||
App: ( | |||
<App | |||
<AppTree | |||
{...appProps} | |||
Component={Component} | |||
router={router} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
router={router} |
bf9d7a4
to
932b3d4
Compare
Stats from current PRDefault Server Mode (Decrease detected ✓)General Overall decrease ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Rendered Page Sizes
Serverless Mode (Decrease detected ✓)General Overall decrease ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Serverless bundles
Commit: 932b3d4 |
932b3d4
to
adb2238
Compare
Stats from current PRDefault Server Mode (Decrease detected ✓)General Overall decrease ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Rendered Page Sizes
Serverless Mode (Decrease detected ✓)General Overall decrease ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Serverless bundles
Commit: adb2238 |
Reported at vercel#9617 Use `AppTree` so that `withRouter` works correctly.
adb2238
to
ec62104
Compare
Stats from current PRDefault Server ModeGeneral
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Rendered Page Sizes
Serverless ModeGeneral
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Serverless bundles
Commit: ec62104 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@supaspoida Thank you 💯
Reported at #9617
Use
AppTree
so thatwithRouter
works correctly.