I have a heading in Layout and I want to pass props to it. So I can start my <main>
element.
Here is my Layout.tsx
<>
<h1>{title}</h1>
<main>
<Outlet /> {/* children */}
</main>
<Footer />
</>
Here is my routes.ts
export default [
layout('./layouts/Layout.tsx', [
index('./pages/index.tsx'),
route('product', './pages/product.tsx'),
route('contact', './pages/contact.tsx'),
]),
] satisfies RouteConfig;
So I can have my page with pre-headding. E.g. about.tsx
<>
<h2>Who are we</h2>
<>