Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[2.0 rc.13 + next] Nested server region stays stale after refetch then argument change

已关闭
#3,894 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
bun, javascript, playwright, typescript
领域
frontend, testing

调研方向

Start with the standalone reproduction, especially client.tsx, server.tsx, and repro.test.ts; run the documented Bun test against a built Solid checkout in development and production. Trace what happens when the server reference is refetched and its argument changes. Done means the automated test shows the nested region updating from 1 to 2 after that sequence.

由索引模型根据 Issue 内容生成。

描述

Describe the bug

Refetching argument 1 and then requesting 2 should update the nested server span to 2; it stays 1.

Your Example Website or App

Standalone reproduction

Steps to Reproduce the Bug or Issue
  1. Use the source below with the selected Solid build (complete setup is linked above).
import { createSignal, Loading, flush } from "solid-js";
import { render, dynamic } from "@solidjs/web";
import { createServerReference } from "@solidjs/web/server-functions/client";
import { installServerComponents } from "@solidjs/web/frames";
installServerComponents();
const get = createServerReference("region");
const [id, setId] = createSignal(1);
const [version, setVersion] = createSignal(0);
const Component = dynamic(() => {
  version();
  return get(id()) as any;
});
render(
  () => (
    <Loading fallback={<b>pending</b>}>
      <Component wrap={(p: any) => <section>{p.children}</section>} />
    </Loading>
  ),
  document.getElementById("root")!,
);
// First call refetch(), then change(): the nested span stays at 1.
(window as any).refetch = () => {
  setVersion(1);
  flush();
};
(window as any).change = () => {
  setId(2);
  flush();
};
  1. Requires a server-component endpoint region(id) returning props => <main><props.wrap><span>{id}</span></props.wrap></main>. Wait for 1, call window.refetch(), wait for that response, then call window.change(). The nested section still shows 1.
Expected behavior

Expected: Changing the server-function argument to 2 replaces the nested content with 2.
Actual: The nested region stays at 1.

Platform
  • Solid: solid-js / @solidjs/web next at 3086f1b77cd7b0431d3a7f768c2984c335758633; comparison 2.0.0-rc.13. Signals, compiler and diagnostics match the selected Solid build.
  • OS: macOS 26.6.2 (25G83); browser cases: system Google Chrome 155.0.8059.40. Server-only/type checks run in Bun 1.4.2.
  • Builds/comparison: Development and production fail on HEAD and rc.13.
Additional context

A refetch followed by new arguments should replace the corresponding nested server content rather than retain the previous region.

Related: #2965, #2974, #2966

Full automated reproduction

One-command setup, run and expected output.

Copy the standalone folder into a fresh Bun project. The visible source above is executed by these tests; the additional files supply the required HTTP, compilation, and browser setup.

bun init -y
bun add [email protected] @solidjs/[email protected] @solidjs/[email protected] @solidjs/[email protected] @solidjs/[email protected]
bun add -d playwright
bun run link-head.ts /absolute/path/to/built/solid
BUILD_MODE=development bun test ./repro.test.ts

The link command selects a built Solid HEAD checkout; omit it for rc.13. Repeat with BUILD_MODE=production for the production comparison. Browser tests use system Google Chrome.

主要语言
TypeScript
星标
36.1k
派生
1.1k
平均合并
11 小时 25 分钟
30 天内合并 PR
345

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

solidjs/solid 的其他 Issue

查看 solidjs/solid 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。