Skip to content

Add support for popular routers #529

@remcohaszing

Description

@remcohaszing

Initial checklist

Problem

Some file system based routers define types for their routes. For example:

Current solutions

Add manual type annotations.

{/* Next.js app/blog/[slug]/page.mdx */}

{/** @typedef {PageProps<'/blog/[slug]'>} Props */}

# Welcome to {props.params.then((params) => params.slug)}

Proposed solutions

Maybe we can detect popular frameworks such as Next.js and React Router, and inject their props type annotations automatically.

{/* Next.js app/blog/[slug]/page.mdx */}

# Welcome to {props.params.then((params) => params.slug)}

The main question is whether we should.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions