Skip to content

[Docs]: Using Middleware in Data Mode requires module augmentation #14343

@silvenon

Description

@silvenon

Describe what's incorrect/missing in the documentation

This is not mentioned in the docs, but in order for context in loaders not to be any, the Future interface in react-router needs to be augmented:

declare module 'react-router' {
  interface Future {
    v8_middleware: true;
  }
}

I don't think there's a way around this, so my proposal is to add this to usage with Data Mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions