@harpy-js/core 0.4.9 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harpy-js/core",
3
- "version": "0.4.9",
3
+ "version": "0.5.0",
4
4
  "description": "Harpy - A powerful NestJS + React/JSX SSR framework with automatic hydration and i18n support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -132,7 +132,21 @@ containers.forEach((container) => {
132
132
  }
133
133
 
134
134
  try {
135
- hydrateRoot(containerElement, React.createElement(${component.componentName}, props));
135
+ // Hydrate the entire container with the component and props script
136
+ // This matches the server-rendered structure from client-component-wrapper.ts
137
+ hydrateRoot(
138
+ containerElement,
139
+ React.createElement(
140
+ React.Fragment,
141
+ null,
142
+ React.createElement(${component.componentName}, props),
143
+ React.createElement('script', {
144
+ type: 'application/json',
145
+ id: \`\${container.id}-props\`,
146
+ dangerouslySetInnerHTML: { __html: JSON.stringify(props) }
147
+ })
148
+ )
149
+ );
136
150
  console.log('[Hydration] Hydrated ${component.componentName}');
137
151
  } catch (error) {
138
152
  console.error('[Hydration] Failed to hydrate ${component.componentName}:', error);