This ticket documents the changes made to enable the VDom worker to correctly handle Server-Side Rendering (SSR) takeover.
Changes:
src/worker/VDom.mjs:
- A new
onRegisterNeoConfig() method has been added.
- This method checks for
config.useSSR and config.idCounters in the initial configuration received from the WorkerManager.
- If both are present, it uses
Object.assign to merge the idCounters into Neo.core.IdGenerator.idCounter. This ensures that the client-side VDom worker continues ID generation from where the server left off, preventing ID collisions during SSR takeover.
src/worker/Manager.mjs:
- The
createWorkers() method has been updated to consistently use useSSR (instead of useSsr) when injecting SSR-related configuration into the workers. This aligns with the framework's naming conventions.
These changes are crucial for the seamless integration of server-rendered content with the client-side VDom worker, supporting the overall SSR takeover strategy.
This ticket documents the changes made to enable the VDom worker to correctly handle Server-Side Rendering (SSR) takeover.
Changes:
src/worker/VDom.mjs:onRegisterNeoConfig()method has been added.config.useSSRandconfig.idCountersin the initial configuration received from theWorkerManager.Object.assignto merge theidCountersintoNeo.core.IdGenerator.idCounter. This ensures that the client-side VDom worker continues ID generation from where the server left off, preventing ID collisions during SSR takeover.src/worker/Manager.mjs:createWorkers()method has been updated to consistently useuseSSR(instead ofuseSsr) when injecting SSR-related configuration into the workers. This aligns with the framework's naming conventions.These changes are crucial for the seamless integration of server-rendered content with the client-side VDom worker, supporting the overall SSR takeover strategy.