Skip to content

React Router v7 "Framework" mode support #4547

@qw-in

Description

@qw-in

Given the suggested upgrade path from Remix is to React Router v7, it would be helpful for anyone using the @arcjet/remix SDK if we had support for react-router@7.

I looked into this some for arcjet/example-remix#75 (comment), and it appears that a framework-specific adapter (@arcjet/react-router) would be required (@arcjet/node is not sufficient - can't get ip and web standards Request type).

I think the adapter would be almost identical to our current @arcjet/remix but with different peer dependencies. It seems for example the same getLoadContext pattern is used in react-router, although it returns a Map now for improved typing. I can't find fantastic documentation for this, but here is a decision log and the definition in the source of @react-router/express.

There is also an upcoming (currently unstable) middleware feature that could impact this. The best information I've found on that currently is in the changelog. Notably it appears to change the way context works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions