The recent refactoring of mount() to return initVnode(true) introduced a regression when Neo.config.useVdomWorker is set to false.
The Issue:
- Remote Execution (Standard): When
useVdomWorker is true, Neo.vdom.Helper.create is accessed via Remote Method Access (RMA). The VDom worker executes the method and sends a reply message. The Neo.worker.Manager in the main thread intercepts this reply, detects autoMount: true, and applies the DOM deltas before forwarding the reply to the App worker.
- Local Execution (No Worker): When
useVdomWorker is false, Helper.create runs locally in the App Worker. It returns a plain object directly. No worker messages are generated, so the Manager never intercepts the result to update the DOM.
- Recursion: The previous code handled this by calling
me.mount(). Since mount() was refactored to call initVnode(true), this created an infinite loop.
The Fix:
We need to manually trigger the DOM update inside initVnode when running locally.
Task:
Modify src/mixin/VdomLifecycle.mjs:
- In
initVnode(), remove the recursive call autoMount && !useVdomWorker && me.mount().
- Replace it with logic that explicitly constructs the
insertNode delta (using the data returned from Helper.create) and sends it to the main thread via Neo.applyDeltas.
This restores the mounting functionality for the non-worker VDOM configuration without relying on the now-circular mount() method.
The recent refactoring of
mount()toreturn initVnode(true)introduced a regression whenNeo.config.useVdomWorkeris set tofalse.The Issue:
useVdomWorkeristrue,Neo.vdom.Helper.createis accessed via Remote Method Access (RMA). The VDom worker executes the method and sends areplymessage. TheNeo.worker.Managerin the main thread intercepts this reply, detectsautoMount: true, and applies the DOM deltas before forwarding the reply to the App worker.useVdomWorkerisfalse,Helper.createruns locally in the App Worker. It returns a plain object directly. No worker messages are generated, so the Manager never intercepts the result to update the DOM.me.mount(). Sincemount()was refactored to callinitVnode(true), this created an infinite loop.The Fix: We need to manually trigger the DOM update inside
initVnodewhen running locally.Task: Modify
src/mixin/VdomLifecycle.mjs:initVnode(), remove the recursive callautoMount && !useVdomWorker && me.mount().insertNodedelta (using the data returned fromHelper.create) and sends it to the main thread viaNeo.applyDeltas.This restores the mounting functionality for the non-worker VDOM configuration without relying on the now-circular
mount()method.