SolidJSS
SolidJSโ€ข3y agoโ€ข
6 replies
eudrino

Cache dom elements with router

I'm trying to cache dom elements between route changes with
@solidjs/router

where instead of recreating dom elements between route changes, instead i use pre-created ones
i tried using
const home = <Home />;
<Route path="/" component={() => home} />

instead of
<Route path="/" component={Home} />

but it prevents me from using the
<A>
tag to link between pages client-side
is there a better way to introduce caching of dom elements?
Was this page helpful?