Skip to content

[Bug]: two pages render simultaneously聽#2297

Closed
ryansolid/dom-expressions
#585

Description

@huseeiin

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 馃槸

No response

Expected behavior 馃

No response

Steps to reproduce 馃暪

import { createAsync, query, Route, Router } from "@solidjs/router";
import { For, Suspense } from "solid-js";
const getVideos$ = query(async () => {
  "use server";
  await new Promise((r) => setTimeout(r, 1000));

  return [{ title: "hi", thumb: "https://picsum.photos/200/300" }];
}, "videos");

const getVideo$ = query(async () => {
  "use server";
  await new Promise((r) => setTimeout(r, 1000));
  return { title: "hi", thumb: "https://picsum.photos/200/300" };
}, "video");

export default function Home() {
  return (
    <Router>
      <Route
        path="/"
        component={() => {
          const videos = createAsync(() => getVideos$());

          return (
            <Suspense fallback={<p>Loading...</p>}>
              <For each={videos()}>
                {(video) => (
                  <a href="/video">
                    <h1>{video.title}</h1>
                    <img src={video.thumb} />
                  </a>
                )}
              </For>
            </Suspense>
          );
        }}
      />
      <Route
        path="/video"
        component={() => {
          const video = createAsync(() => getVideo$());
          return (
            <Suspense fallback={<p>Loading...</p>}>
              {video()?.title}
              <img src={video()?.thumb} />
            </Suspense>
          );
        }}
      />
    </Router>
  );
}

do exactly what's in the video:

Screencast_20260818_185051.webm

Context 馃敠

No response

Your environment 馃寧

Activity

  1. brenelz commented on Aug 23, 2026

    @brenelz
    Contributor

    AI couldn't seem to replicate this. Birk were you able to replicate?

  2. davedbase commented on Aug 24, 2026

    @davedbase
    Member

    I can confirm this is a real issue as well.

    I've managed to create a reproduction, however it actually works on Stackblitz and breaks locally! If you move the code from Stackbliz to your local system and run it you can observe the same issue. This minimal reproduction might be helpful to exploring the issue.

    Differences in environments that I'm noting:

    • Local Node version: v26
    • Stackblitz Node version: v20

    Link to repro: https://stackblitz.com/edit/github-y2k9kdyh?file=package.json

    Edit: The thing in common between both our examples seems to be the use of "use server". Ps ignore the use of createAsync instead of query in the repro.

  3. added theissue type on Aug 24, 2026
  4. changed the title [-][Bug?]: two pages render simultaneously[/-] [+][Bug]: two pages render simultaneously[/+] on Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions