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

Update dependency react-router-dom to v6.17.0 #949

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 16, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react-router-dom 6.16.0 -> 6.17.0 age adoption passing confidence

Release Notes

remix-run/react-router (react-router-dom)

v6.17.0

Compare Source

Minor Changes
  • Add experimental support for the View Transitions API via document.startViewTransition to enable CSS animated transitions on SPA navigations in your application. (#​10916)

    The simplest approach to enabling a View Transition in your React Router app is via the new <Link unstable_viewTransition> prop. This will cause the navigation DOM update to be wrapped in document.startViewTransition which will enable transitions for the DOM update. Without any additional CSS styles, you'll get a basic cross-fade animation for your page.

    If you need to apply more fine-grained styles for your animations, you can leverage the unstable_useViewTransitionState hook which will tell you when a transition is in progress and you can use that to apply classes or styles:

    function ImageLink(to, src, alt) {
      let isTransitioning = unstable_useViewTransitionState(to);
      return (
        <Link to={to} unstable_viewTransition>
          <img
            src={src}
            alt={alt}
            style={{
              viewTransitionName: isTransitioning ? "image-expand" : "",
            }}
          />
        </Link>
      );
    }

    You can also use the <NavLink unstable_viewTransition> shorthand which will manage the hook usage for you and automatically add a transitioning class to the <a> during the transition:

    a.transitioning img {
      view-transition-name: "image-expand";
    }
    <NavLink to={to} unstable_viewTransition>
      <img src={src} alt={alt} />
    </NavLink>

    For an example usage of View Transitions with React Router, check out our fork of the Astro Records demo.

    For more information on using the View Transitions API, please refer to the Smooth and simple transitions with the View Transitions API guide from the Google Chrome team.

    Please note, that because the ViewTransition API is a DOM API, we now export a specific RouterProvider from react-router-dom with this functionality. If you are importing RouterProvider from react-router, then it will not support view transitions. (#​10928

Patch Changes

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 0ce42db to 167014e Compare October 16, 2023 16:35
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 167014e to 575d803 Compare October 17, 2023 06:53
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 575d803 to 9124bea Compare October 17, 2023 06:57
@buberdds buberdds closed this Oct 17, 2023
@buberdds buberdds reopened this Oct 17, 2023
@github-actions
Copy link

github-actions bot commented Oct 17, 2023

Deployed to Cloudflare Pages

Latest commit: 9124bea0ae6662bfdef5ba7fd4d3c26d43d38a0f
Status:✅ Deploy successful!
Preview URL: https://b183d9b7.oasis-explorer.pages.dev

@buberdds buberdds merged commit c8a3de6 into master Oct 17, 2023
8 checks passed
@buberdds buberdds deleted the renovate/react-dependencies branch October 17, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant