Skip to content

Commit 5707101

Browse files
committed
Don't treat the vt- attributes as a hydration mismatch
1 parent ed2b02f commit 5707101

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/react-dom-bindings/src/client/ReactDOMComponent.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ import {
7272
enableScrollEndPolyfill,
7373
enableSrcObject,
7474
enableTrustedTypesIntegration,
75+
enableViewTransition,
7576
} from 'shared/ReactFeatureFlags';
7677
import {
7778
mediaEventTypes,
@@ -3217,6 +3218,18 @@ export function diffHydratedProperties(
32173218
break;
32183219
case 'selected':
32193220
break;
3221+
case 'vt-name':
3222+
case 'vt-update':
3223+
case 'vt-enter':
3224+
case 'vt-exit':
3225+
case 'vt-share':
3226+
if (enableViewTransition) {
3227+
// View Transition annotations are expected from the Server Runtime.
3228+
// However, if they're also specified on the client and don't match
3229+
// that's an error.
3230+
break;
3231+
}
3232+
// Fallthrough
32203233
default:
32213234
// Intentionally use the original name.
32223235
// See discussion in https://github.com/facebook/react/pull/10676.

0 commit comments

Comments
 (0)