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

Add prefetch disabling for specific Links #973

Merged
merged 1 commit into from Jan 16, 2019
Merged

Add prefetch disabling for specific Links #973

merged 1 commit into from Jan 16, 2019

Conversation

krzysztof-pyrzyk-ah
Copy link
Contributor

@krzysztof-pyrzyk-ah krzysztof-pyrzyk-ah commented Jan 16, 2019

Description

I've added one more check before prefetch is being done so that it can be disabled easily.
This feature was working fine in React-Static v5, but in v6 there's a new router and it stopped working.

By adding prefetch="false" to a <Link> component we can prevent React-Static from prefetching this route.

Some documentation has to be added, but I wasn't sure where to put it.
Waiting for your suggestions.

Motivation and Context

Without this change you cannot disable prefetching specific links.
It fixes an issue I've opened here.

Types of changes

  • Refactoring/add tests (refactoring or adding test which isn't a fix or add a feature)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • My changes have tests around them

@tannerlinsley
Copy link
Contributor

Genius :)

@tannerlinsley tannerlinsley merged commit 71fb2ee into react-static:master Jan 16, 2019
@krzysztof-pyrzyk-ah krzysztof-pyrzyk-ah deleted the add-prefetch-disabling branch January 16, 2019 17:48
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.

None yet

2 participants