Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Jan 17, 2023
1 parent e0f74d8 commit 12ac55d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/remix-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- Add `future.v2_errorBoundary` flag to opt-into v2 `ErrorBoundary` behavior. This removes the separate `CatchBoundary` and `ErrorBoundary` and consolidates them into a single `ErrorBoundary` following the logic used by `errorElement` in React Router. You can then use `isRouteErrorResponse` to differentiate between thrown `Response`/`Error` instances. ([#4918](https://github.com/remix-run/remix/pull/4918))

```jsx
/* eslint-disable import/no-extraneous-dependencies */
// Current (Remix v1 default)
import { useCatch } from "@remix-run/react";

Expand All @@ -29,7 +30,10 @@
export function ErrorBoundary({ error }) {
return <p>{error.message}</p>;
}
```

```jsx
/* eslint-disable import/no-extraneous-dependencies */
// Using future.v2_errorBoundary
import { isRouteErrorResponse, useRouteError } from "@remix-run/react";
Expand Down
4 changes: 4 additions & 0 deletions packages/remix-server-runtime/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Add `future.v2_errorBoundary` flag to opt-into v2 `ErrorBoundary` behavior. This removes the separate `CatchBoundary` and `ErrorBoundary` and consolidates them into a single `ErrorBoundary` following the logic used by `errorElement` in React Router. You can then use `isRouteErrorResponse` to differentiate between thrown `Response`/`Error` instances. ([#4918](https://github.com/remix-run/remix/pull/4918))

```jsx
/* eslint-disable import/no-extraneous-dependencies */
// Current (Remix v1 default)
import { useCatch } from "@remix-run/react";

Expand All @@ -28,7 +29,10 @@
export function ErrorBoundary({ error }) {
return <p>{error.message}</p>;
}
```

```jsx
/* eslint-disable import/no-extraneous-dependencies */
// Using future.v2_errorBoundary
import { isRouteErrorResponse, useRouteError } from "@remix-run/react";
Expand Down

0 comments on commit 12ac55d

Please sign in to comment.