Skip to content

Commit

Permalink
Re-export response helpers through react package (#8351)
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 authored Dec 21, 2023
1 parent 66adc8f commit fa3d2c2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/twelve-cars-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/react": patch
---

Export `Response` helpers (`defer`/`json`/`redirect`/`redirectDocument`) through `@remix-run/react` for use in `clientLoader`/`clientAction`
11 changes: 9 additions & 2 deletions packages/remix-react/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export type { RemixBrowserProps } from "./browser";
export { RemixBrowser } from "./browser";
export type {
ErrorResponse,
Fetcher,
Expand Down Expand Up @@ -52,7 +50,16 @@ export {
unstable_usePrompt,
unstable_useViewTransitionState,
} from "react-router-dom";
export {
// For use in clientLoader/clientAction
defer,
json,
redirect,
redirectDocument,
} from "@remix-run/server-runtime";

export type { RemixBrowserProps } from "./browser";
export { RemixBrowser } from "./browser";
export type {
AwaitProps,
RemixNavLinkProps as NavLinkProps,
Expand Down

0 comments on commit fa3d2c2

Please sign in to comment.