guide: a write waits for an action when a displayed equation reads its source together with a source the action holds, from `onFlush` too
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- documentation
Línea de trabajo
Lee guide/async.md §3–4 y la sección “What lands together, and what waits”, junto con guide/reference.md en “Actions”. Aclara cómo se comporta una escritura cuando una ecuación mostrada depende tanto de su fuente como de una fuente retenida por una Action, incluidas las escrituras desde onFlush, y distingue ese caso de una expresión de vista que lee ambas directamente. El trabajo estará terminado cuando la guía explique los casos reportados de forma coherente con los ejemplos y las indicaciones existentes sobre H-3 y EF-8.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Found while building a component library on ReactiveScript. Written with Claude Fable 5.2 (in Claude Code), which also ran the reproductions; all of them were rerun before posting.
The guide shipped in @reactivescript/compiler 0.3.1. Run as: compiler 0.3.1 through @solidjs/vite-plugin
3.0.0-next.57 on a Vite dev server, mounted with const app = createApp({ root }); app.mount(main(app)) from
@reactivescript/runtime 0.3.1, in Chromium, on solid-js 2.0.0-rc.22 and on 2.0.0. A Playwright script clicks
the buttons and reads the text of the <p> elements.
api.js:
export const wait = (ms, value) => new Promise((resolve) => setTimeout(() => resolve(value), ms));
b-shown.rx:
import { wait } from "./api.js"
export default component App() {
source open := true
source page := 1
both = { open: open, page: page }
action go() {
page := 2
try { await wait(300, 0) } catch (e) { }
}
<div>
<button onClick={() => { go() }}>go</button>
<button onClick={() => { open := false }}>close</button>
<p>open: {open ? "yes" : "no"}</p>
<p>page: {page}</p>
<p>both.open: {both.open ? "yes" : "no"}</p>
</div>
}
| step | screen |
|---|---|
| mount | open: yes, page: 1, both.open: yes |
| click go | open: yes, page: 1, both.open: yes |
| click close | open: yes, page: 1, both.open: yes |
| 100 ms later | open: yes, page: 1, both.open: yes |
| the wait resolves | open: no, page: 2, both.open: no |
The first paragraph reads open alone and waits with the third. The action never writes open. With the close
button removed and onFlush(() => { open := false }) added after page := 2 in go, the screen is the same at
every step: the onFlush write waits too.
This is H-3 (both is derived from the held page, and its reader joins), and S-solid-4's sum variant is the
nearest scenario, there with a flight in place of an action's write.
The guide gives two cases and two remedies, and b-shown.rx is neither case and gets no help from either remedy:
guide/async.md§4: "A click waits for an action it has nothing to do with. A plain write to a source an
action in flight has written or guessed joins that action's hold (H-2): a click that clears the action's error
waits for the server. Keep such a write off the action's sources, or make it anonFlushrun."guide/async.md§3, the table: "Land a UI write now and keep it (close a menu, clear a message) |
onFlush(() => { x := v })(EF-8)".guide/reference.md, "Actions": "onFlush(() => { … }): runs right after this run's instant, even while the
action holds it. Use it for a write that must land now, such as clearing an input or an error (EF-8)."
One view expression over the same two values does not join. With the both line and its paragraph replaced by
<p>{(open ? "open" : "closed") + " on " + page}</p>, the click on close shows open: no and closed on 1. That
fits H-3, which serves "a reader of a source written by another open change" and says "An equation never
serves". It does not fit EF-8's parenthesis, "(H-2, D-8; a write to a held slot, or a reader of
both)", read literally: this is a reader of both and its write commits alone. V-1 and E-2 also make {e} a reader
"with equation e", so nothing in the guide or the spec's surface rules tells an author that giving the
expression a name changes when the write lands.
Suggested sentence, in "What lands together, and what waits" or in §4 after "or make it an onFlush run": a write
also waits when an equation the view reads depends on its source and on a source the action holds, from an
onFlush run too; one view expression that reads both does not wait.
- Lenguaje dominante
- TypeScript
- Estrellas
- 127
- Forks
- 7
- Merge medio
- 15 h 42 min
- PR fusionados (30 d)
- 63
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de solidjs/reactivescript
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
solidjs/reactivescript#96 ·
Los mantenedores suelen responder en 1 día
-
Vite front end keeps serving a failed build after the missing/broken imported module is fixedPosiblemente ocupada @cgaaf la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
solidjs/reactivescript#84 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
solidjs/reactivescript#74 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
solidjs/reactivescript#97 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
solidjs/reactivescript#83 ·
Los mantenedores suelen responder en 1 día
Todos los issues de solidjs/reactivescript
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
GetStream/stream-chat-react#3467 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
vercel-labs/ui#1139 ·
Los mantenedores suelen responder en 1 día
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10Posiblemente ocupada @goranai la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
[Bug] IntegerRange.contains counts a non-integer just above max as inside an inclusive rangeAbiertobot:ai-assisted component:platform-js status:untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
midnightntwrk/platform-js#93 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100