dillon1000/react

Commit

Add "auto" class to mean the built-in should run (#32761)

Stacked on https://github.com/facebook/react/pull/32734

In React a ViewTransition class of `"none"` doesn't just mean that it
has no class but also that it has no ViewTransition name. The default
(`null | undefined`) means that it has no specific class but should run
with the default built-in animation. This adds this as an explicit
string called `"auto"` as well.

That way you can do `<ViewTransition default="foo" enter="auto">` to
override the "foo" just for the "enter" trigger to be the default
built-in animation. Where as if you just specified `null` it would be
like not specifying enter at all which would trigger "foo".
Browse files
Changed paths1 file
First-parent comparison
M packages/react-reconciler/src/ReactFiberViewTransitionComponent.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…