Closed damassi closed 1 month ago
8051938(current) vs 7d954e7 main#272(baseline)
[!WARNING] Bundle contains 45 duplicate packages – View duplicate packages
Bundle metrics
5 changes
1 regression
1 improvement
Current #276 |
Baseline #272 |
|
---|---|---|
Initial JS | 4.31MiB (+0.04% ) |
4.3MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 10.21% |
0% |
Chunks | 141 |
141 |
Assets | 144 |
144 |
Modules | 5554 (-0.05% ) |
5557 |
Duplicate Modules | 376 (-1.05% ) |
380 |
Duplicate Code | 4.78% (-0.21% ) |
4.79% |
Packages | 292 |
292 |
Duplicate Packages | 42 |
42 |
1 change
1 regression
Bundle analysis report Branch damassi/feat/prefetch-on-hover Project dashboard
Generated by RelativeCI Documentation Report issue
Warnings | |
---|---|
:warning: | Routes added to `routes.tsx` should have a corresponding cypress.js smoke test. See the `cypress/e2e` folder for examples. |
Generated by :no_entry_sign: dangerJS against 8051938f3865bcf606b383ee37ce6d12f4b12093
Things are behind a feature flag; merging
The type of this PR is: Feat
This PR solves DIA-832
Description
This adds support for route prefetching on hover, via a new
usePrefetchRoute
hook which we can use this like so:Right now this is wired into our
RouterLink
component but we could extend its use any which way.Internally we're using Relay's
fetchQuery
fn, withstore-or-network
so that if something has already been fetched, it returns the result immediately and skips subsequent fetches.Still need to wire up A/B test but wanted to open this up so folks can pull it down and play with it, as well as branch off of this PR to wire up a review app that isn't segmented by unleash.
Demo:
https://github.com/user-attachments/assets/1792dea0-3591-4a8f-9c07-dfba2baf2981
cc @artsy/diamond-devs