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

Cancel images on mouse-leave #38

Merged
merged 3 commits into from
Oct 21, 2024
Merged

Cancel images on mouse-leave #38

merged 3 commits into from
Oct 21, 2024

Conversation

cramforce
Copy link
Collaborator

No description provided.

Copy link

vercel bot commented Oct 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-master 🛑 Canceled (Inspect) Oct 21, 2024 4:00pm

@@ -121,3 +122,26 @@ export const Link: typeof NextLink = (({ children, ...props }) => {
</NextLink>
);
}) as typeof NextLink;

function prefetchImage(image: PrefetchImage) {
Copy link
Collaborator

@gaojude gaojude Oct 21, 2024

Choose a reason for hiding this comment

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

This approach works, but a more idiomatic solution would be to use React’s preload function in the RSC and prefetching the RSC payload would trigger the image to download at the time of prefetching?

@cramforce cramforce merged commit 770dea3 into main Oct 21, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

3 participants