Skip to content
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

force persistor persist again after persistStore bootstrap done #16085

Merged
merged 5 commits into from
Sep 1, 2020

Conversation

weichienhung
Copy link
Contributor

@weichienhung weichienhung commented Aug 11, 2020

This PR is to fix "[Examples] Problem with query parameters in with-redux-persist (#15484)"
The root cause is
persist/rehydrate action will issue twice when query parameter is set. But persistStore initial bootstrap is not ready yet. So i add a bootstrap callback and force persistor to persist again to make overall state correct. I also modify the loading prop to a <div>loading</div> because it's confuse to set Component in loading prop.

Attached the GIF
demo

Closes #15484

@ijjk ijjk added the examples Issue/PR related to examples label Aug 11, 2020
@ijjk
Copy link
Member

ijjk commented Aug 11, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
buildDuration 11.8s 12.3s ⚠️ +434ms
nodeModulesSize 57.2 MB 57.2 MB
Page Load Tests Overall increase ✓
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
/ failed reqs 0 0
/ total time (seconds) 2.129 2.099 -0.03
/ avg req/sec 1174.25 1191.27 +17.02
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.2 1.168 -0.03
/error-in-render avg req/sec 2083.36 2141.04 +57.68
Client Bundles (main, webpack, commons)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..6aa6.js gzip 10 kB 10 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-9a7a5f4..661e.js gzip 6.71 kB 6.71 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.6 kB 56.6 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..dule.js gzip 5.92 kB 5.92 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-d0ac695..dule.js gzip 5.79 kB 5.79 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.6 kB 51.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-4c2bd9b..eadd.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-236a801..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 279 B 279 B
Overall change 552 B 552 B
Rendered Page Sizes
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
index.html gzip 945 B 945 B
link.html gzip 954 B 954 B
withRouter.html gzip 939 B 939 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
buildDuration 13.2s 13.7s ⚠️ +452ms
nodeModulesSize 57.2 MB 57.2 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..6aa6.js gzip 10 kB 10 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-9a7a5f4..661e.js gzip 6.71 kB 6.71 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.6 kB 56.6 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..dule.js gzip 5.92 kB 5.92 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-d0ac695..dule.js gzip 5.79 kB 5.79 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.6 kB 51.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-4c2bd9b..eadd.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-236a801..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 279 B 279 B
Overall change 552 B 552 B
Serverless bundles
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_error.js 1.03 MB 1.03 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB
routerDirect.js 1.06 MB 1.06 MB
withRouter.js 1.06 MB 1.06 MB
Overall change 5.26 MB 5.26 MB
Commit: af0d948

@ijjk
Copy link
Member

ijjk commented Aug 11, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
buildDuration 12.7s 12.4s -337ms
nodeModulesSize 57.2 MB 57.2 MB
Page Load Tests Overall increase ✓
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
/ failed reqs 0 0
/ total time (seconds) 2.216 2.201 -0.02
/ avg req/sec 1128.13 1135.84 +7.71
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.274 1.237 -0.04
/error-in-render avg req/sec 1962.89 2021.69 +58.8
Client Bundles (main, webpack, commons)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..6aa6.js gzip 10 kB 10 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-9a7a5f4..661e.js gzip 6.71 kB 6.71 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.6 kB 56.6 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..dule.js gzip 5.92 kB 5.92 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-d0ac695..dule.js gzip 5.79 kB 5.79 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.6 kB 51.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-4c2bd9b..eadd.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-236a801..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 279 B 279 B
Overall change 552 B 552 B
Rendered Page Sizes
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
index.html gzip 945 B 945 B
link.html gzip 954 B 954 B
withRouter.html gzip 939 B 939 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
buildDuration 14.4s 14.4s ⚠️ +27ms
nodeModulesSize 57.2 MB 57.2 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..6aa6.js gzip 10 kB 10 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-9a7a5f4..661e.js gzip 6.71 kB 6.71 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.6 kB 56.6 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..dule.js gzip 5.92 kB 5.92 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-d0ac695..dule.js gzip 5.79 kB 5.79 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.6 kB 51.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-4c2bd9b..eadd.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-236a801..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 279 B 279 B
Overall change 552 B 552 B
Serverless bundles
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_error.js 1.03 MB 1.03 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB
routerDirect.js 1.06 MB 1.06 MB
withRouter.js 1.06 MB 1.06 MB
Overall change 5.26 MB 5.26 MB
Commit: 0e1a0fe

@ijjk
Copy link
Member

ijjk commented Aug 12, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
buildDuration 10.6s 10.4s -230ms
nodeModulesSize 57.3 MB 57.3 MB
Page Load Tests Overall increase ✓
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
/ failed reqs 0 0
/ total time (seconds) 1.876 1.878 0
/ avg req/sec 1332.93 1330.96 ⚠️ -1.97
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.044 1.037 -0.01
/error-in-render avg req/sec 2395.28 2410.24 +14.96
Client Bundles (main, webpack, commons)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..6aa6.js gzip 10 kB 10 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-9a7a5f4..661e.js gzip 6.71 kB 6.71 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.6 kB 56.6 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..dule.js gzip 5.92 kB 5.92 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-d0ac695..dule.js gzip 5.79 kB 5.79 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.6 kB 51.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-4c2bd9b..eadd.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-236a801..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 279 B 279 B
Overall change 552 B 552 B
Rendered Page Sizes
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
index.html gzip 945 B 945 B
link.html gzip 954 B 954 B
withRouter.html gzip 939 B 939 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
buildDuration 12.3s 11.9s -386ms
nodeModulesSize 57.3 MB 57.3 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..6aa6.js gzip 10 kB 10 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-9a7a5f4..661e.js gzip 6.71 kB 6.71 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.6 kB 56.6 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..dule.js gzip 5.92 kB 5.92 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-d0ac695..dule.js gzip 5.79 kB 5.79 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.6 kB 51.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-4c2bd9b..eadd.js gzip 1.29 kB 1.29 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-236a801..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_buildManifest.js gzip 273 B 273 B
_buildManife..dule.js gzip 279 B 279 B
Overall change 552 B 552 B
Serverless bundles
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_error.js 1.03 MB 1.03 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB
routerDirect.js 1.06 MB 1.06 MB
withRouter.js 1.06 MB 1.06 MB
Overall change 5.26 MB 5.26 MB
Commit: 38a2f94

@JForsaken
Copy link

JForsaken commented Aug 12, 2020

I tried this solution, and it seems like the loading is still very slow compared to when no query params are in the URL.

@weichienhung
Copy link
Contributor Author

I tried this solution, and it seems like the loading is still very slow compared to when no query params are in the URL.

It's because one action is waiting until timeout. Can add a timeout in persistConfig

const persistConfig = {
  key: 'primary',
  storage,
  timeout: 200,
  whitelist: ['exampleData'], // place to select which state you want to persist
}

Copy link
Member

@lfades lfades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weichienhung LGTM. Thank you!

@ijjk
Copy link
Member

ijjk commented Sep 1, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
buildDuration 12.8s 12.8s ⚠️ +13ms
nodeModulesSize 55.9 MB 55.9 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
/ failed reqs 0 0
/ total time (seconds) 2.242 2.259 ⚠️ +0.02
/ avg req/sec 1115.3 1106.64 ⚠️ -8.66
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.246 1.267 ⚠️ +0.02
/error-in-render avg req/sec 2006.27 1973.88 ⚠️ -32.39
Client Bundles (main, webpack, commons)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..9ff9.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-b338f5a..3500.js gzip 7.31 kB 7.31 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.3 kB 57.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..dule.js gzip 6.13 kB 6.13 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-830c506..dule.js gzip 6.37 kB 6.37 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.2 kB 52.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-ae98065..267e.js gzip 1.29 kB 1.29 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.69 kB 7.69 kB
Client Pages Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-cb244c4..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.35 kB 5.35 kB
Client Build Manifests
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
index.html gzip 971 B 971 B
link.html gzip 976 B 976 B
withRouter.html gzip 965 B 965 B
Overall change 2.91 kB 2.91 kB

Serverless Mode
General
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
buildDuration 14s 14.4s ⚠️ +403ms
nodeModulesSize 55.9 MB 55.9 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..9ff9.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-b338f5a..3500.js gzip 7.31 kB 7.31 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.3 kB 57.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..dule.js gzip 6.13 kB 6.13 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-830c506..dule.js gzip 6.37 kB 6.37 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.2 kB 52.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-ae98065..267e.js gzip 1.29 kB 1.29 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.69 kB 7.69 kB
Client Pages Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-cb244c4..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.35 kB 5.35 kB
Client Build Manifests
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_error.js 1.03 MB 1.03 MB
404.html 4.22 kB 4.22 kB
hooks.html 3.86 kB 3.86 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB
routerDirect.js 1.07 MB 1.07 MB
withRouter.js 1.07 MB 1.07 MB
Overall change 5.28 MB 5.28 MB
Commit: cee5008

@ijjk
Copy link
Member

ijjk commented Sep 1, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
buildDuration 12.3s 12.9s ⚠️ +631ms
nodeModulesSize 55.9 MB 55.9 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
/ failed reqs 0 0
/ total time (seconds) 2.219 2.36 ⚠️ +0.14
/ avg req/sec 1126.5 1059.19 ⚠️ -67.31
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.237 1.236 0
/error-in-render avg req/sec 2021.59 2022.63 +1.04
Client Bundles (main, webpack, commons)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..9ff9.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-b338f5a..3500.js gzip 7.31 kB 7.31 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.3 kB 57.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..dule.js gzip 6.13 kB 6.13 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-830c506..dule.js gzip 6.37 kB 6.37 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.2 kB 52.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-ae98065..267e.js gzip 1.29 kB 1.29 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.69 kB 7.69 kB
Client Pages Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-cb244c4..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.35 kB 5.35 kB
Client Build Manifests
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
index.html gzip 971 B 971 B
link.html gzip 976 B 976 B
withRouter.html gzip 965 B 965 B
Overall change 2.91 kB 2.91 kB

Serverless Mode
General
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
buildDuration 14.4s 14.3s -74ms
nodeModulesSize 55.9 MB 55.9 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..9ff9.js gzip 10.3 kB 10.3 kB
framework.HASH.js gzip 39 kB 39 kB
main-b338f5a..3500.js gzip 7.31 kB 7.31 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.3 kB 57.3 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
677f882d2ed8..dule.js gzip 6.13 kB 6.13 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-830c506..dule.js gzip 6.37 kB 6.37 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.2 kB 52.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-ae98065..267e.js gzip 1.29 kB 1.29 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.69 kB 7.69 kB
Client Pages Modern
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-cb244c4..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.35 kB 5.35 kB
Client Build Manifests
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles
vercel/next.js canary weichienhung/next.js fix_with_redux_persist_failure Change
_error.js 1.03 MB 1.03 MB
404.html 4.22 kB 4.22 kB
hooks.html 3.86 kB 3.86 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB
routerDirect.js 1.07 MB 1.07 MB
withRouter.js 1.07 MB 1.07 MB
Overall change 5.28 MB 5.28 MB
Commit: bfdb108

@kodiakhq kodiakhq bot merged commit aa568a5 into vercel:canary Sep 1, 2020
@weichienhung weichienhung deleted the fix_with_redux_persist_failure branch September 2, 2020 01:15
ijjk pushed a commit to ijjk/next.js that referenced this pull request Sep 2, 2020
…el#16085)

This PR is to fix "[Examples] Problem with query parameters in with-redux-persist (vercel#15484)"
The root cause is 
persist/rehydrate action will issue twice when query parameter is set. But persistStore initial bootstrap is not ready yet. So i add a bootstrap callback and force persistor to persist again to make overall state correct. I also modify the loading prop to a `<div>loading</div>` because it's confuse to set Component in loading prop. 

Attached the GIF
![demo](https://user-images.githubusercontent.com/1462027/89922530-bec04000-dc31-11ea-9831-12cd9d436d96.gif)

Closes vercel#15484
HitoriSensei pushed a commit to HitoriSensei/next.js that referenced this pull request Sep 26, 2020
…el#16085)

This PR is to fix "[Examples] Problem with query parameters in with-redux-persist (vercel#15484)"
The root cause is 
persist/rehydrate action will issue twice when query parameter is set. But persistStore initial bootstrap is not ready yet. So i add a bootstrap callback and force persistor to persist again to make overall state correct. I also modify the loading prop to a `<div>loading</div>` because it's confuse to set Component in loading prop. 

Attached the GIF
![demo](https://user-images.githubusercontent.com/1462027/89922530-bec04000-dc31-11ea-9831-12cd9d436d96.gif)

Closes vercel#15484
@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Examples] Problem with query parameters in with-redux-persist
4 participants