Skip to content

Commit 4518bc9

Browse files
huozhiijjk
andauthored
docs: reword the docs of veiw transition flag (#76841)
### What Mention it's experimental feature and maintained by react team, we're still developing it --------- Co-authored-by: JJ Kasper <[email protected]>
1 parent 7e5e69d commit 4518bc9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/01-app/04-api-reference/05-config/01-next-config-js/viewTransition.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Enable ViewTransition API from React in App Router
44
version: experimental
55
---
66

7-
`viewTransition` is an experimental feature that a feature flag to enable the new experimental [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API) with React. This new API allows you to leverage the View Transition browser API to create seamless transitions.
7+
`viewTransition` is an experimental flag that enables the new experimental [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API) in React. This API allows you to leverage the native View Transitions browser API to create seamless transitions between UI states.
88

99
To enable this feature, you need to set the `viewTransition` property to `true` in your `next.config.js` file.
1010

@@ -19,7 +19,8 @@ const nextConfig = {
1919
module.exports = nextConfig
2020
```
2121

22-
> Note: This feature is highly experimental and may change in future releases.
22+
> Important Notice: This feature is not developed or maintained by the Next.js team — it is an experimental API from the React team. It is still in **early stages** and **not recommended for production use**. The implementation is still being iterated on, and its behavior may change in future React releases.
23+
> Enabling this feature requires understanding the experimental nature of the API. To fully grasp its behavior, refer to the [React pull request](https://github.com/facebook/react/pull/31975) and related discussions.
2324
2425
## Usage
2526

@@ -29,10 +30,10 @@ Once enabled, you can import the `ViewTransition` component from React in your a
2930
import { unstable_ViewTransition as ViewTransition } from 'react'
3031
```
3132

32-
For more details on how to use this feature, refer to the [original View Transitions pull request](https://github.com/facebook/react/pull/31975) in the React repository. This feature builds upon the native browser implementation of View Transitions.
33+
However, documentation and examples are currently limited, and you will need to refer directly to React’s source code and discussions to understand how this works.
3334

3435
### Live Demo
3536

3637
Check out our [Next.js View Transition Demo](https://view-transition-example.vercel.app) to see this feature in action.
3738

38-
We will continue to expand our documentation and examples as this API evolves.
39+
As this API evolves, we will update our documentation and share more examples. However, for now, we strongly advise against using this feature in production.

0 commit comments

Comments
 (0)