Skip to content

Commit

Permalink
fix: change metadata to options bag
Browse files Browse the repository at this point in the history
  • Loading branch information
bholmesdev committed May 11, 2022
1 parent a67dacb commit b04de83
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/astro/src/runtime/server/hydration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export async function generateHydrateScript(
)}"), import("${await result.resolve(renderer.clientEntrypoint)}")]);
return (el, children) => hydrate(el)(Component, ${serializeProps(
props
)}, children, ${JSON.stringify(hydrate)});
)}, children, ${JSON.stringify({ client: hydrate })});
`
: `await import("${await result.resolve(componentUrl)}");
return () => {};
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/react/client-v17.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createElement } from 'react';
import { render, hydrate } from 'react-dom';
import StaticHtml from './static-html.js';

export default (element) => (Component, props, children) =>
export default (element) => (Component, props, children, { client }) =>
{
const componentEl = createElement(
Component,
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/react/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createElement } from 'react';
import { createRoot, hydrateRoot } from 'react-dom/client';
import StaticHtml from './static-html.js';

export default (element) => (Component, props, children, client) =>
export default (element) => (Component, props, children, { client }) =>
{
const componentEl = createElement(
Component,
Expand Down

0 comments on commit b04de83

Please sign in to comment.