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

fix(remix-react): dedupe links in getStylesheetPrefetchLinks #5678

Closed
wants to merge 3 commits into from

Conversation

grinkus-adapt
Copy link

Closes: #5677

  • Docs
  • Tests

Deduplicating links in getStylesheetPrefetchLinks avoids inserting links with the same key prop, which React dev complains about. It's not an issue in prod build, but this tweak makes the developer experience a bit better in an edge-case where there's a stylesheet that's imported in the sub-page that a Link with prefetch prop is pointing to.

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Mar 6, 2023

Hi @grinkus-adapt,

Welcome, and thank you for contributing to Remix!

Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.

You may review the CLA and sign it by adding your name to contributors.yml.

Once the CLA is signed, the CLA Signed label will be added to the pull request.

If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run.

Thanks!

- The Remix team

@changeset-bot
Copy link

changeset-bot bot commented Mar 6, 2023

🦋 Changeset detected

Latest commit: 24f9d13

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@remix-run/react Patch
@remix-run/testing Patch
create-remix Patch
remix Patch
@remix-run/architect Patch
@remix-run/cloudflare Patch
@remix-run/cloudflare-pages Patch
@remix-run/cloudflare-workers Patch
@remix-run/css-bundle Patch
@remix-run/deno Patch
@remix-run/dev Patch
@remix-run/eslint-config Patch
@remix-run/express Patch
@remix-run/netlify Patch
@remix-run/node Patch
@remix-run/serve Patch
@remix-run/server-runtime Patch
@remix-run/vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Mar 6, 2023

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

@markdalgleish
Copy link
Member

Thanks for the PR! As mentioned in the original issue, I've opened a PR that goes a bit further than your suggested fix because this was actually a symptom of a deeper issue, so I'm closing this in favour of this one: #7060.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

Duplicate children keys in getStylesheetPrefetchLinks
3 participants