add support for typed search/route params in generateMetadata
#94
+99
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #92
This PR: Adds support for a new higher order function wrapping Next's generateMetadata() to add the same parsing for route/search params as in the normal page component
the function is basically identical to the existing
withParamValidation
but without the react stuff required for higher order components (check out the example!)right now ive named it also
withParamValidation
and put it innext-typesafe-url/app
but this leads to a name conflict in its intended usecase (again see example)
TODO!
Decide on how to name / where to put this function
Make sure it works (@adamkangas @jac0bbennett if you could test this out its live on
4.0.7-beta.3
now)Update docs
(if ready to be merged) Yes I have made a changeset
(still work todo)