S
SolidJS•6mo ago
tozz

Solid Router 0.10.x double render of App

Just upgraded to 0.10.5 and the migration of code was simple enough, but running into a weird scenario where if I have a wrapper element in my <App> it gets rendered twice, whereas if I just have <>...</> it renders fine. This causes double rendering (two 'standard-grid' divs, two menus etc).
const App = (props: { children?: JSXElement}) => (
<div class="standard-grid">
<Menu />
{props.children}
</div>
);
const App = (props: { children?: JSXElement}) => (
<div class="standard-grid">
<Menu />
{props.children}
</div>
);
This works (but adding the div inside the <> causes it to render double again.
const App = (props: { children?: JSXElement}) => (
<>
<Menu />
{props.children}
<>
);
const App = (props: { children?: JSXElement}) => (
<>
<Menu />
{props.children}
<>
);
Router is setup very simply with <Router root={App}>...
Edit: I had missed a previous wrapped route that caused the double render, nothing to see here 😅
0 Replies
No replies yetBe the first to reply to this messageJoin