Skip to content

Add supportsViewTransition host config flag#35965

Open
zeyap wants to merge 1 commit intofacebook:mainfrom
zeyap:supportsViewTransition
Open

Add supportsViewTransition host config flag#35965
zeyap wants to merge 1 commit intofacebook:mainfrom
zeyap:supportsViewTransition

Conversation

@zeyap
Copy link

@zeyap zeyap commented Mar 5, 2026

Summary

  • Adds a supportsViewTransition host config flag (like supportsMutation, supportsHydration) so the reconciler can check renderer capability directly
  • Extracts view-transition stubs from ReactFiberConfigWithNoMutation.js into a new ReactFiberConfigWithNoViewTransition.js
  • Replaces !supportsMutation && !supportsPersistence checks in the reconciler with !supportsViewTransition
  • Sets supportsViewTransition = true for DOM and Fabric renderers, false for Native (paper), ART, and test-renderer

Test plan

  • Existing view transition tests should pass unchanged
  • yarn flow for dom-node, fabric, native renderers

@@ -413,6 +413,7 @@ export const isPrimaryRenderer = false;
export const warnsIfNotActing = false;

export const supportsMutation = true;
export const supportsViewTransition = false;
Copy link
Member

Choose a reason for hiding this comment

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

instead this should add this below:

export * from 'react-reconciler/src/ReactFiberConfigWithNoViewTransition';

Copy link
Member

Choose a reason for hiding this comment

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

Same for everywhere else it's being set in the other fiber configs

@zeyap zeyap force-pushed the supportsViewTransition branch from 740940d to db2eee7 Compare March 5, 2026 20:14
@@ -139,7 +139,7 @@ function applyViewTransitionToHostInstancesRecursive(
collectMeasurements: null | Array<InstanceMeasurement>,
stopAtNestedViewTransitions: boolean,
): boolean {
if (!supportsMutation) {
if (!supportsViewTransition) {
Copy link
Member

Choose a reason for hiding this comment

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

sus, i don't know if this makes sense. need to think about this more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants