Release

Coralite v0.38.2 Released

Coralite v0.38.2 improves state synchronization by ensuring server() hook results correctly propagate to client state, client getters, and imperative components.

TD
Thomas David June 20, 2026

Coralite v0.38.2 addresses key synchronization issues between server-side rendering (SSR) and the client bundle. This patch release ensures that data returned from the server() function reliably propagates to client state, client getters, and imperative APIs during hydration.

Reliable server() State and Getters Propagation

In previous versions, data returned by the server-side server() hook occasionally failed to reflect correctly in the initial client state or computed getters during hydration. This release fixes those synchronization gaps with several targeted enhancements:

  • Strict Validation: Implemented strict validation checks for server() return values, ensuring they resolve to a truthy object before proceeding with hydration.
  • Hydration Payload Integration: All keys evaluated and returned by the server-side logic are now explicitly guaranteed to be included in the hydration payload and mapped to the initial client state.
  • Default Value Overwrites: Values returned from the server() hook will now correctly overwrite any client-side default values defined in your component's state.
  • Imperative Component Availability: Base evaluation results from the server are now accessible to imperative components via defaultValues.
  • Removal of 'Smart' Filtering: Removed complex and unreliable filtering of state keys for the client bundle to achieve a more predictable and robust data flow.

Here is an example demonstrating how server-evaluated results now correctly overwrite client state default values during initialization:

javascript
Code copied!
  // Server-side logic
  export async function server(context) {
    return {
      theme: 'dark',
      authenticated: true
    };
  }
  
  // Client-side component state definition
  export const state = {
    theme: 'light',       // Overwritten by 'dark' during hydration
    authenticated: false  // Overwritten by true during hydration
  };

How to Upgrade

To upgrade to the latest version, update your project dependencies:

bash
Code copied!
  npm install coralite@0.38.2
bash
Code copied!
  npm install coralite-scripts@0.38.2
TD

Thomas David

Creator of Coralite. Writing about the intersection of native web APIs, compiler design, and AI-assisted development.