next.js
35adcd1a - Replace getDynamicParamFromSegment closure with interpolatedParams in metadata (#90249)

Commit
3 days ago
Replace getDynamicParamFromSegment closure with interpolatedParams in metadata (#90249) Stacked on #90217 Metadata resolution only needs param names and values to pass to generateMetadata. It doesn't need treeSegment, staticSiblings, or the DynamicParam type that getDynamicParamFromSegment produces. Replace the closure dependency with interpolatedParams (a plain Params object) and use getSegmentParam to parse segment names inline. This replaces a closure over request-scoped state with a simple data value, removing another dependency that blocked making metadata components standalone.
Author
Parents
Loading