Hey Friends,
I am a fairly new developer playing around with Redwood js with typescript and I have hit a wall using layouts. I have spun up a fresh project on v6 (this also happened on v5), added new layout to add a simple nav bar as described in the tutorial and am getting the following ts error.
JSX element class does not support attributes because it does not have a ‘props’ property.
My router file looks like this
const Routes = () => {
return (
<Router>
<Set wrap={PlannerLayout}>
<Route path="/about" page={AboutPage} name="about" />
<Route path="/" page={HomePage} name="home" />
</Set>
<Route notfound page={NotFoundPage} />
</Router>
)
}
And my Layout file looks like this
const PlannerLayout = ({ children }: PlannerLayoutProps) => {
return (
<>
<header>
<h1>
<Link to={routes.home()}>Redwood Blog</Link>
</h1>
<nav>
<ul>
<li>
<Link to={routes.home()}>Home</Link>
</li>
<li>
<Link to={routes.about()}>About</Link>
</li>
</ul>
</nav>
</header>
<main>{children}</main>
</>
)
}
Any help would be hugely appreciated.