Rezact / Rezact

A JavaScript Framework/Library (call it what you want) that blends the best of svelte, solid, react, and many others.

Home Page:https://rezact.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IMPROVEMENT: Cache Templates, only update the route component, not the entire layout

zachlankton opened this issue · comments

if (mod.Layout) {
// this will likely work but the fact that we completely clear the
// app.innerHTML above means the entire layout will rerender
// need to look at "caching" the current layout, checking if the new layout is the same
// using a signal to store the actual mod.Page || mod.default render
// and just assigninging the new "Page" to that Signal
// then only the "children" of the Layout will update as long as the new Layout
// is the same as the current Layout
render(app, (props) => mod.Layout(props), {
Component: mod.Page || mod.default,
pageProps: {
routeParams: params,
},
});

This issue is blocked by #30 .... using signals to swap the Route Components needs to be able to handle Fragments