redfin / react-server

:rocket: Blazing fast page load and seamless navigation.
https://react-server.io/
Apache License 2.0
3.89k stars 184 forks source link

Page request fired twice when using bundleData #986

Open salehhamadeh opened 6 years ago

salehhamadeh commented 6 years ago

When using the bundleData prop with react-server's Link, any subsequent requests to that page in the same history stack will have an unnecessary XHR page request.

Repro steps:

  1. Run react-server-test-pages
  2. Go to http://localhost:3000/navigation/data-bundle-cache
  3. Click Go. This has bundleData=true
  4. Refresh the page

Expected: When you refresh the page, there should be no XHR like this http://localhost:3000/navigation/data-bundle-cache?page=7&_react_server_data_bundle=1 Actual: The unnecessary XHR is fired.

This issue does not happen if you open a new tab and go to the URL.