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

fix(deps): update dependency react-router-dom to ~6.10.0 #46

Merged
merged 1 commit into from Apr 7, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 16, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react-router-dom ~6.4.0 -> ~6.10.0 age adoption passing confidence

Release Notes

remix-run/react-router

v6.10.0

Compare Source

Minor Changes
  • Added support for Future Flags in React Router. The first flag being introduced is future.v7_normalizeFormMethod which will normalize the exposed useNavigation()/useFetcher() formMethod fields as uppercase HTTP methods to align with the fetch() behavior. (#​10207)

    • When future.v7_normalizeFormMethod === false (default v6 behavior),
      • useNavigation().formMethod is lowercase
      • useFetcher().formMethod is lowercase
    • When future.v7_normalizeFormMethod === true:
      • useNavigation().formMethod is uppercase
      • useFetcher().formMethod is uppercase
Patch Changes
  • Fix createStaticHandler to also check for ErrorBoundary on routes in addition to errorElement (#​10190)
  • Updated dependencies:
    • @remix-run/router@1.5.0
    • react-router@6.10.0

v6.9.0

Compare Source

Minor Changes
  • React Router now supports an alternative way to define your route element and errorElement fields as React Components instead of React Elements. You can instead pass a React Component to the new Component and ErrorBoundary fields if you choose. There is no functional difference between the two, so use whichever approach you prefer 😀. You shouldn't be defining both, but if you do Component/ErrorBoundary will "win". (#​10045)

    Example JSON Syntax

    // Both of these work the same:
    const elementRoutes = [{
      path: '/',
      element: <Home />,
      errorElement: <HomeError />,
    }]
    
    const componentRoutes = [{
      path: '/',
      Component: Home,
      ErrorBoundary: HomeError,
    }]
    
    function Home() { ... }
    function HomeError() { ... }

    Example JSX Syntax

    // Both of these work the same:
    const elementRoutes = createRoutesFromElements(
      <Route path='/' element={<Home />} errorElement={<HomeError /> } />
    );
    
    const componentRoutes = createRoutesFromElements(
      <Route path='/' Component={Home} ErrorBoundary={HomeError} />
    );
    
    function Home() { ... }
    function HomeError() { ... }
  • Introducing Lazy Route Modules! (#​10045)

    In order to keep your application bundles small and support code-splitting of your routes, we've introduced a new lazy() route property. This is an async function that resolves the non-route-matching portions of your route definition (loader, action, element/Component, errorElement/ErrorBoundary, shouldRevalidate, handle).

    Lazy routes are resolved on initial load and during the loading or submitting phase of a navigation or fetcher call. You cannot lazily define route-matching properties (path, index, children) since we only execute your lazy route functions after we've matched known routes.

    Your lazy functions will typically return the result of a dynamic import.

    // In this example, we assume most folks land on the homepage so we include that
    // in our critical-path bundle, but then we lazily load modules for /a and /b so
    // they don't load until the user navigates to those routes
    let routes = createRoutesFromElements(
      <Route path="/" element={<Layout />}>
        <Route index element={<Home />} />
        <Route path="a" lazy={() => import("./a")} />
        <Route path="b" lazy={() => import("./b")} />
      </Route>
    );

    Then in your lazy route modules, export the properties you want defined for the route:

    export async function loader({ request }) {
      let data = await fetchData(request);
      return json(data);
    }
    
    // Export a `Component` directly instead of needing to create a React Element from it
    export function Component() {
      let data = useLoaderData();
    
      return (
        <>
          <h1>You made it!</h1>
          <p>{data}</p>
        </>
      );
    }
    
    // Export an `ErrorBoundary` directly instead of needing to create a React Element from it
    export function ErrorBoundary() {
      let error = useRouteError();
      return isRouteErrorResponse(error) ? (
        <h1>
          {error.status} {error.statusText}
        </h1>
      ) : (
        <h1>{error.message || error}</h1>
      );
    }

    An example of this in action can be found in the examples/lazy-loading-router-provider directory of the repository.

    🙌 Huge thanks to @​rossipedia for the Initial Proposal and POC Implementation.

  • Updated dependencies:

    • react-router@6.9.0
    • @remix-run/router@1.4.0

v6.8.2

Compare Source

Patch Changes
  • Treat same-origin absolute URLs in <Link to> as external if they are outside of the router basename (#​10135)
  • Fix useBlocker to return IDLE_BLOCKER during SSR (#​10046)
  • Fix SSR of absolute <Link to> urls (#​10112)
  • Properly escape HTML characters in StaticRouterProvider serialized hydration data (#​10068)
  • Updated dependencies:
    • @remix-run/router@1.3.3
    • react-router@6.8.2

v6.8.1

Compare Source

Patch Changes
  • Improved absolute url detection in Link component (now also supports mailto: urls) (#​9994)
  • Fix partial object (search or hash only) pathnames losing current path value (#​10029)
  • Updated dependencies:
    • react-router@6.8.1
    • @remix-run/router@1.3.2

v6.8.0

Compare Source

Minor Changes
  • Support absolute URLs in <Link to>. If the URL is for the current origin, it will still do a client-side navigation. If the URL is for a different origin then it will do a fresh document request for the new origin. (#​9900)

    <Link to="https://neworigin.com/some/path">    {/* Document request */}
    <Link to="//neworigin.com/some/path">          {/* Document request */}
    <Link to="https://www.currentorigin.com/path"> {/* Client-side navigation */}
Patch Changes
  • Fix bug with search params removal via useSearchParams (#​9969)
  • Respect preventScrollReset on <fetcher.Form> (#​9963)
  • Fix navigation for hash routers on manual URL changes (#​9980)
  • Use pagehide instead of beforeunload for <ScrollRestoration>. This has better cross-browser support, specifically on Mobile Safari. (#​9945)
  • Updated dependencies:
    • @remix-run/router@1.3.1
    • react-router@6.8.0

v6.7.0

Compare Source

Minor Changes
  • Add unstable_useBlocker hook for blocking navigations within the app's location origin (#​9709)
  • Add unstable_usePrompt hook for blocking navigations within the app's location origin (#​9932)
  • Add preventScrollReset prop to <Form> (#​9886)
Patch Changes
  • Added pass-through event listener options argument to useBeforeUnload (#​9709)
  • Streamline jsdom bug workaround in tests (#​9824)
  • Updated dependencies:
    • @remix-run/router@1.3.0
    • react-router@6.7.0

v6.6.2

Compare Source

Patch Changes
  • Ensure useId consistency during SSR (#​9805)
  • Updated dependencies:
    • react-router@6.6.2

v6.6.1

Compare Source

Patch Changes
  • Updated dependencies:
    • @remix-run/router@1.2.1
    • react-router@6.6.1

v6.6.0

Compare Source

Minor Changes
  • Add useBeforeUnload() hook (#​9664)
  • Remove unstable_ prefix from createStaticHandler/createStaticRouter/StaticRouterProvider (#​9738)
Patch Changes
  • Proper hydration of Error objects from StaticRouterProvider (#​9664)
  • Support uppercase <Form method> and useSubmit method values (#​9664)
  • Skip initial scroll restoration for SSR apps with hydrationData (#​9664)
  • Fix <button formmethod> form submission overriddes (#​9664)
  • Updated dependencies:
    • @remix-run/router@1.2.0
    • react-router@6.6.0

v6.5.0

Compare Source

Patch Changes
  • Updated dependencies:
    • react-router@6.5.0
    • @remix-run/router@1.1.0

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.

@renovate renovate bot changed the title fix(deps): update dependency react-router-dom to ~6.5.0 Update dependency react-router-dom to ~6.5.0 Dec 17, 2022
@renovate renovate bot changed the title Update dependency react-router-dom to ~6.5.0 fix(deps): update dependency react-router-dom to ~6.5.0 Dec 17, 2022
@renovate renovate bot changed the title fix(deps): update dependency react-router-dom to ~6.5.0 fix(deps): update dependency react-router-dom to ~6.6.0 Dec 21, 2022
@renovate renovate bot force-pushed the renovate/react-router-monorepo branch from 69b5ced to e3ce8ee Compare December 21, 2022 20:59
@renovate renovate bot force-pushed the renovate/react-router-monorepo branch from e3ce8ee to 8189c81 Compare January 18, 2023 23:08
@renovate renovate bot changed the title fix(deps): update dependency react-router-dom to ~6.6.0 fix(deps): update dependency react-router-dom to ~6.7.0 Jan 18, 2023
@renovate renovate bot changed the title fix(deps): update dependency react-router-dom to ~6.7.0 fix(deps): update dependency react-router-dom to ~6.8.0 Jan 26, 2023
@renovate renovate bot force-pushed the renovate/react-router-monorepo branch from 8189c81 to 4a61802 Compare January 26, 2023 19:08
@renovate renovate bot force-pushed the renovate/react-router-monorepo branch from 4a61802 to 4c09739 Compare March 10, 2023 18:21
@renovate renovate bot changed the title fix(deps): update dependency react-router-dom to ~6.8.0 fix(deps): update dependency react-router-dom to ~6.9.0 Mar 10, 2023
@renovate renovate bot changed the title fix(deps): update dependency react-router-dom to ~6.9.0 fix(deps): update dependency react-router-dom to ~6.10.0 Mar 29, 2023
@renovate renovate bot force-pushed the renovate/react-router-monorepo branch from 4c09739 to ce83a8c Compare March 29, 2023 22:29
@jaywcjlove jaywcjlove merged commit 74d1378 into main Apr 7, 2023
@jaywcjlove jaywcjlove deleted the renovate/react-router-monorepo branch April 7, 2023 05:05
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.

None yet

1 participant