Repository navigation
feat: add React Router (Remix) framework adapter - #142
Merged
Merged
Conversation
Adds better-payment/react-router, which returns a loader and an action for a splat resource route. Closes #96.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Closes #96
Adds
better-payment/react-router.toReactRouterHandler(source)returns aloader(GET) and anaction(POST) for a splat resource route, so React Router v7 and Remix v2 apps mount the handler in one line:It wraps
toFetchHandlerand uses a structural{ request: Request }type, so there is no dependency onreact-router.package.jsonexports, vitest andtsconfig.examples.jsonaliases, size budget (1 kB; built size 0.25 kB gzip)tests/unit/adapters/adapters.test.ts(lazy source, GET throughloader, POST throughaction)examples/frameworks.ts, docs section in English and Turkish (frameworks page, handler table, README), changesetChecklist
pnpm lint,pnpm typecheckandpnpm testpasspnpm changeset)node apps/web/scripts/check-translations.mjs), or no docs change is needed<Since version="x.y.z" />badge in their docs, or no badge is needed