Skip to content

Conversation

@sidmohanty11
Copy link
Contributor

@sidmohanty11 sidmohanty11 commented Sep 29, 2025

Description

Handles fetch priority casing based on React versions

In a previous PR, vercel/next.js#47302, detection for fetchPriority assumed that facebook/react#25927 would land in [email protected] because that was the react@canary version at the time. However, it didn't land in [email protected] and it is expected to land in [email protected] due to the breaking change.
This means that users upgrading to [email protected] will see a warning.

Inspiration from:
facebook/react#28946
vercel/next.js#65235
ascorbic/unpic-img#644

Screenshot
If relevant, add a screenshot or two of the changes you made.

@changeset-bot
Copy link

changeset-bot bot commented Sep 29, 2025

🦋 Changeset detected

Latest commit: 611deab

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

This PR includes changesets to release 1 package
Name Type
@builder.io/react 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

@nx-cloud
Copy link

nx-cloud bot commented Sep 29, 2025

View your CI Pipeline Execution ↗ for commit 611deab

Command Status Duration Result
nx test @e2e/qwik-city ✅ Succeeded 11m 43s View ↗
nx test @snippet/react-sdk-next-pages ✅ Succeeded 9m 50s View ↗
nx test @e2e/nuxt ✅ Succeeded 9m 41s View ↗
nx test @e2e/nextjs-sdk-next-app ✅ Succeeded 9m 2s View ↗
nx test @e2e/angular-17 ✅ Succeeded 8m 44s View ↗
nx test @e2e/react-sdk-next-15-app ✅ Succeeded 7m 53s View ↗
nx test @e2e/react-native-76-fabric ✅ Succeeded 7m 26s View ↗
nx test @e2e/angular-19-ssr ✅ Succeeded 7m 39s View ↗
Additional runs (37) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-09-29 14:24:39 UTC

get fetchPriorityProp() {
const propNameToUse = isNewReact ? 'fetchPriority' : 'fetchpriority';
return {
[propNameToUse]: this.props.highPriority ? 'high' : 'auto',
Copy link
Contributor

Choose a reason for hiding this comment

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

The previous logic for this value was
const eagerLoad = isPixel || this.props.highPriority;

Do we need to add isPixel check here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for the catch, i've updated it

Copy link
Contributor

@sanyamkamat sanyamkamat left a comment

Choose a reason for hiding this comment

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

LGTM

@sidmohanty11 sidmohanty11 merged commit 958c11b into BuilderIO:main Sep 30, 2025
47 checks passed
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.

2 participants