Skip to content

solid-router: css animations are re-triggered after query updates #8000

Description

@PierBover

Which project does this relate to?

Router

Describe the bug

When using query with solid router, the routes are remounted when the query updates which unfortunately causes CSS animations to retrigger.

tanstack.mov

When the route mounts, the red rectangle will fade in which is expected. But after a few seconds it will re-flash again when the query updates because it seems the route DOM element is remounted.

Complete minimal reproducer

https://github.com/PierBover/tanstack-solid-router-repro

Steps to Reproduce the Bug

npm i && npm run dev

Then navigate between the routes.

Expected behavior

The route should not be remounted and CSS animations should not be re-triggered. The query data should be updated reactively, probably?

Platform

    "@tanstack/solid-query": "5.101.4",
    "@tanstack/solid-router": "latest",
    "solid-js": "^1.9.12"

I'm on macOS Sequoia and I've seen this happening in both Chrome and Firefox.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions