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

Race condition #1009

Open
katsu223 opened this issue Jul 2, 2024 · 0 comments
Open

Race condition #1009

katsu223 opened this issue Jul 2, 2024 · 0 comments

Comments

@katsu223
Copy link

katsu223 commented Jul 2, 2024

🐛 Bug Report

Race condition while loading chunk

To Reproduce

Basically need to render AsyncPage and change path until chunk is fully loaded. This will lead to race condition - chunk from request will be rendered regardless of path in props.

Real world usage:

  1. Slow internet speed and fast route change.
  2. Programmatically redirect

Expected behavior

If path props is changed, proper chunk must be rendered, pending requests should be skipped.

Link to repl or repo (highly encouraged)

https://codesandbox.io/p/sandbox/xenodochial-waterfall-rgl9d4

Run npx envinfo --system --binaries --npmPackages @loadable/component,@loadable/server,@loadable/webpack-plugin,@loadable/babel-plugin --markdown --clipboard

Paste the results here:
locally:

## System:
 - OS: macOS 14.5
 - CPU: (10) arm64 Apple M1 Pro
 - Memory: 67.88 MB / 32.00 GB
 - Shell: 5.9 - /bin/zsh
## Binaries:
 - Node: 16.17.0 - ~/.nodenv/versions/16.17.0/bin/node
 - Yarn: 1.22.19 - ~/.nodenv/versions/16.17.0/bin/yarn
 - npm: 8.15.0 - ~/.nodenv/versions/16.17.0/bin/npm
## npmPackages:
 - @loadable/component: ^5.16.4 => 5.16.4

on codesandbox:

## System:
 - OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
 - CPU: (2) x64 AMD EPYC
 - Memory: 2.25 GB / 4.01 GB
 - Container: Yes
 - Shell: Unknown
## Binaries:
 - Node: 20.9.0 - /usr/local/bin/node
 - Yarn: 1.22.19 - /usr/local/bin/yarn
 - npm: 9.8.1 - /usr/local/bin/npm
 - pnpm: 8.10.2 - /usr/local/share/npm-global/bin/pnpm
## npmPackages:
 - @loadable/component: 5.16.4 => 5.16.4 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant