Skip to content

Support for higher order function wrapping Next's generateMetadata() #92

@adamkangas

Description

@adamkangas

Hi there,

This library is great for wrapping my app dir components in withParamValidation – but there's no similar higher order function for getting type safety in Next's generateMetadata exports which can rely on route params.

https://nextjs.org/docs/app/api-reference/functions/generate-metadata

This seems relatively straightforward to implement by abstracting out some of the logic in withParamValidation to a common function.

Is this something that's been considered, and if it's a decent idea would you be open to implementing it or accepting a PR? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions