I know that search params are accessible in page component props, but can the deeply-nested, non-page server components inside the same route segment also access search params somehow? For example, let's assume a scenario. We have the following component structure:
RouteSegmentPage
ServerComponentLevel1
...
ServerComponentLevelN
LeafClientComponent
AnotherRouteSegmentPage
...
RouteSegmentPage
displays a rich page that consists of many nested non-page child components, all in the same route segment. ServerComponentLevelN
needs to fetch some data using search params. How can we achieve this without prop drilling search params from RouteSegmentPage
to all the way down to ServerComponentLevelN
?
Note: ServerComponentLevelN
needs to stay as server component.