diff --git a/packages/integrations/preact/client.js b/packages/integrations/preact/client.js index 5ece5ddb2..6ff40d2ae 100644 --- a/packages/integrations/preact/client.js +++ b/packages/integrations/preact/client.js @@ -1,8 +1,10 @@ import { h, render } from 'preact'; import StaticHtml from './static-html.js'; -export default (element) => (Component, props, children) => +export default (element) => (Component, props, children) => { + if (!element.hasAttribute('ssr')) return; render( h(Component, props, children != null ? h(StaticHtml, { value: children }) : children), element ); +}