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

Prefetch on hover #157

Closed
nhooyr opened this issue Dec 23, 2019 · 6 comments
Closed

Prefetch on hover #157

nhooyr opened this issue Dec 23, 2019 · 6 comments

Comments

@nhooyr
Copy link

nhooyr commented Dec 23, 2019

I'm using onMouseHover on my Links to prefetch components. It'd be nice if Link could support this natively with a boolean option.

navi could also cancel the request if the user has moved their mouse away.

@nhooyr
Copy link
Author

nhooyr commented Dec 23, 2019

At the very least we need to add a field for onMouseHover in LinkProps.

@nhooyr
Copy link
Author

nhooyr commented Dec 23, 2019

Should just accept all HTML element props.

@jamesknelson
Copy link
Collaborator

Should just accept all HTML element props.

I agree. Will see what I can do.

jamesknelson added a commit that referenced this issue Dec 26, 2019
@nhooyr
Copy link
Author

nhooyr commented Dec 27, 2019

Thank you @jamesknelson <3

@kirelagin
Copy link

kirelagin commented Jan 25, 2020

For anyone searching around why their target="_blank" or target="_parent" don’t work, these commits fixed that too.

@kirelagin
Copy link

@jamesknelson You might also be interested in how react-router does this: since recently they added a check for target="_self": https://github.com/ReactTraining/react-router/blob/f31bb27aa61dd4cb1c3cd9aa78133f739e2e9bb9/packages/react-router-dom/modules/Link.js#L43

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

3 participants