mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
9c0c8492d9
* fix: prevent client hydration when rendering via Container API * revert change that is not needed * skip client directives via option * reword changeset * Fix types of react server.d.ts * add new API --------- Co-authored-by: Matthew Phillips <matthew@skypack.dev>
538 B
538 B
astro |
---|
patch |
Adds a new function called addClientRenderer
to the Container API.
This function should be used when rendering components using the client:*
directives. The addClientRenderer
API must be used
after the use of the addServerRenderer
:
const container = await experimental_AstroContainer.create();
container.addServerRenderer({renderer});
container.addClientRenderer({name: '@astrojs/react', entrypoint: '@astrojs/react/client.js'});
const response = await container.renderToResponse(Component);