summaryrefslogtreecommitdiff
path: root/packages/renderers/preact/static-html.js
diff options
context:
space:
mode:
authorGravatar natemoo-re <natemoo-re@users.noreply.github.com> 2021-05-26 18:31:27 +0000
committerGravatar GitHub Actions <actions@github.com> 2021-05-26 18:31:27 +0000
commit5fa7e354b3e66ea95b2c210f51cc2517897bf8f0 (patch)
treed8bbe3764e006c147d5198d53ec1d126bde75379 /packages/renderers/preact/static-html.js
parent643c880f280c3f571a022b6f4d40b6d5a0e911b5 (diff)
downloadastro-5fa7e354b3e66ea95b2c210f51cc2517897bf8f0.tar.gz
astro-5fa7e354b3e66ea95b2c210f51cc2517897bf8f0.tar.zst
astro-5fa7e354b3e66ea95b2c210f51cc2517897bf8f0.zip
[ci] yarn format
Diffstat (limited to 'packages/renderers/preact/static-html.js')
-rw-r--r--packages/renderers/preact/static-html.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/renderers/preact/static-html.js b/packages/renderers/preact/static-html.js
index 28e31ea80..5a31a68af 100644
--- a/packages/renderers/preact/static-html.js
+++ b/packages/renderers/preact/static-html.js
@@ -9,16 +9,16 @@ import { h } from 'preact';
*/
const StaticHtml = ({ value }) => {
if (!value) return null;
- return h('astro-fragment', { dangerouslySetInnerHTML: { __html: value }});
-}
+ return h('astro-fragment', { dangerouslySetInnerHTML: { __html: value } });
+};
/**
- * This tells Preact to opt-out of re-rendering this subtree,
- * In addition to being a performance optimization,
- * this also allows other frameworks to attach to `children`.
- *
- * See https://preactjs.com/guide/v8/external-dom-mutations
- */
+ * This tells Preact to opt-out of re-rendering this subtree,
+ * In addition to being a performance optimization,
+ * this also allows other frameworks to attach to `children`.
+ *
+ * See https://preactjs.com/guide/v8/external-dom-mutations
+ */
StaticHtml.shouldComponentUpdate = () => false;
export default StaticHtml;