Using page params in a vanilla React application

The instructions in “Dynamic data-driven pages with code components” seem to be Next.js/Gatsby specific.

I can set a path with a slug for my item details page (something like “/itemDetails/[id]”). I can set a preview value for the “id” parameter in Studio, and see the right id used throughout the different components rendered inside the page in Studio. But when I load my application and navigate to “/itemDetails/1”, the parameter is undefined and everything falls apart :frowning:

The Next.js example in the docs makes use of PageParamsProvider, but that component is never mentioned anywhere else in that page or in any other. Looking at the source code of PlasmicRootProvider (plasmic/PlasmicRootProvider.tsx at @plasmicapp/loader-react@1.0.175 · plasmicapp/plasmic · GitHub) I see that it already renders a PageParamsProvider, but I also see that the params props is just forwarded from PlasmicRootProvider to PageParamsProvider. But that prop is never mentioned in the docs of PlasmicRootProvider, so… I’m really confused right now ^_^U.

Should I extract the params and manually pass them to PlasmicRootProvider?