Skip to content

Commit

Permalink
Re-export response helpers through react package
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Dec 21, 2023
1 parent 6adaee8 commit 0ada21e
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 0ada21e

Please sign in to comment.