SolidJSS
SolidJS2y ago
andi

solid-router, don't remount when component is the same between routes

Hi, let's say I have this simplified route config
[
  { path: "/", component: Home },
  { path: "/test", component: Home },
]


When the user goes from
/
to
/test
, the whole component remounts, even though it's the same one
Is there a way to force it to not re-mount it and only change the props?

Normally it wouldn't be an issue, but there's a background video in the hero section that flickers when the page switches (because it's re-mounting the dom)
Was this page helpful?