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

Re-export response helpers through react package #8351

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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