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

feat: added reloadDocument to <Link> and <NavLink> #8283

Merged
merged 4 commits into from
Nov 9, 2021

Conversation

jacob-ebey
Copy link
Member

No description provided.

@jacob-ebey jacob-ebey changed the title feat: added forceDocument to <Link> feat: added reloadDocument to <Link> Nov 8, 2021
@jacob-ebey jacob-ebey changed the title feat: added reloadDocument to <Link> feat: added reloadDocument to <Link> and <NavLink> Nov 8, 2021
Copy link
Member

@mjackson mjackson left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Would you please go and update docs/api.md as well?

@MeiKatz
Copy link
Contributor

MeiKatz commented Nov 9, 2021

To be honest: why should I add reloadDocument on a <Link /> component instead of using basic old <a /> element?

@ryanflorence
Copy link
Member

ryanflorence commented Nov 9, 2021

So you can have the relative to resolution. This is more important over in Remix where you can link to a resource route that isn't part of your UI, like a PDF or a download or something. In Remix these are also routes, they just don't render UI, so having relative links to them is great.

But there are other use cases, like:

  • websocket tells you there's a new version of the app
  • automatically add reloadDocument to every link so the next click gets the new version

@ryanflorence ryanflorence merged commit 7c9e6ae into dev Nov 9, 2021
@ryanflorence ryanflorence deleted the jacob/force-document branch November 9, 2021 14:53
chaance pushed a commit that referenced this pull request Nov 9, 2021
* feat: added forceDocument to `<Link>`

* renamed to reloadDocument

* chore(docs): added docs on reloadDocument

* chore(docs): typos

Co-authored-by: Ryan Florence <rpflorence@gmail.com>
@reloadedhead
Copy link

Is there any plan to add this to navigate?

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.

5 participants