Hi Guys, what is the way to pass context from a page to child Product component without manually adding lines in each page.
createPage({
path: variation.slug,
component: slash(
require.resolve(`./src/pages/` + productSlug + ".jsx")
),
context: { ...variation }, // pass single page data in context, so its available in the singlePostTemplate in props.pageContext.
})
Page ->page component-> product component
This is the component down the line where i want to get access to, without manually adding stuff in page and page component
function Product_( props, ref) {
return <PlasmicProduct root={{ ref }}
}