View Transitions in React may be coming soon with this newly opened PR by Sebastian Markbåge.

Conceptually the <ViewTransition> component is like a DOM fragment that transitions its children in its own isolate/snapshot. The API works by wrapping a DOM node or inner component:

import { ViewTransition } from 'react';

<ViewTransition>
  <Component />
</ViewTransition>

The default is name="auto" which will automatically assign a view-transition-name to the inner DOM node. That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.

Via X

Leave a Reply

Your email address will not be published. Required fields are marked *

More Technology Knowledge Updates…