Skip to content

Commit

Permalink
feat(app): use route.name as page component key
Browse files Browse the repository at this point in the history
This way, changing the params of the route doesn't retrigger a complete navigation. The old keying system was there so we could ease the migration to Vue 3,
but the composable essentially handles all the heavy lifting for us

Signed-off-by: Fernando Fernández <[email protected]>
  • Loading branch information
ferferga committed Apr 16, 2024
1 parent 148ac6b commit fe03c72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
:mode="defaultTransitionMode">
<Suspense suspensible>
<div
:key="route.path"
:key="route.name ?? route.path"
class="h-100 j-transition">
<component
:is="Component"
:key="route.path" />
:key="route.name ?? route.path" />
</div>
</Suspense>
</JTransition>
Expand Down

0 comments on commit fe03c72

Please sign in to comment.