Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Use React Routers 6.27 viewTransition prop #1552

Open
chenjiahan opened this issue Nov 5, 2024 · 0 comments
Open

[Feature]: Use React Routers 6.27 viewTransition prop #1552

chenjiahan opened this issue Nov 5, 2024 · 0 comments

Comments

@chenjiahan
Copy link
Member

What problem does this feature solve?

Since React Router 6.27.0, using View Transition API requires only adding viewTransition prop to Link component:

<Link to={to} viewTransition>
  Click me
</Link>

It can replace the current useViewTransition hook in Rspress, and this should fix the current runtime error logs when using themeConfig.enableContentAnimation:

Image

What does the proposed API look like?

  • Using the viewTransition prop
  • The React Router document also notes that viewTransition only works when using a data router, see Picking a Router.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant