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

[Bug]: Update comments recommending to use polyfill.io #11742

Closed
behnam-oneschema opened this issue Jun 27, 2024 · 3 comments
Closed

[Bug]: Update comments recommending to use polyfill.io #11742

behnam-oneschema opened this issue Jun 27, 2024 · 3 comments
Labels

Comments

@behnam-oneschema
Copy link

What version of React Router are you using?

main

Steps to Reproduce

In useSearchParams() impl we have:

typeof URLSearchParams !== "undefined",
`You cannot use the \`useSearchParams\` hook in a browser that does not ` +
`support the URLSearchParams API. If you need to support Internet ` +
`Explorer 11, we recommend you load a polyfill such as ` +
`https://github.com/ungap/url-search-params\n\n` +
`If you're unsure how to load polyfills, we recommend you check out ` +
`https://polyfill.io/v3/ which provides some recommendations about how ` +
`to load polyfills only for users that need them, instead of for every ` +
`user.`
);

Expected Behavior

Another recommendation in place of:

      `If you're unsure how to load polyfills, we recommend you check out ` +
      `https://polyfill.io/v3/ which provides some recommendations about how ` +
      `to load polyfills only for users that need them, instead of for every ` +
      `user.`

Actual Behavior

N/A

@behnam-oneschema
Copy link
Author

Context: https://www.sonatype.com/blog/polyfill.io-supply-chain-attack-hits-100000-websites-all-you-need-to-know

@udbhavgoyal-fareye
Copy link

This should be fixed by replacing the reference to polyfill.io with Cloudflare equivalent. Similiar fix has been implemented in thebuilder/react-intersection-observer#684

More details here - https://blog.cloudflare.com/automatically-replacing-polyfill-io-links-with-cloudflares-mirror-for-a-safer-internet

@brophdawg11
Copy link
Contributor

Dup of #11733

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants