Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
adamkangas opened this issue Mar 8, 2024 · 1 comment · May be fixed by #94
Open

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

adamkangas opened this issue Mar 8, 2024 · 1 comment · May be fixed by #94

Comments

@adamkangas
Copy link

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!

@ethanniser
Copy link
Owner

check out the generateMetadata branch :)
it needs a bit more work but im a bit busy rn
hopefully ill get to it this weekend

@ethanniser ethanniser linked a pull request Mar 9, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants