summaryrefslogtreecommitdiff
path: root/packages/integrations/react/client.js
diff options
context:
space:
mode:
authorGravatar matthewp <matthewp@users.noreply.github.com> 2022-05-12 16:06:40 +0000
committerGravatar github-actions[bot] <github-actions[bot]@users.noreply.github.com> 2022-05-12 16:06:40 +0000
commit8666f22a0f845973de28cddd358861f65981f168 (patch)
tree9f7e8afbe5a54eacf0151d692bce24211f95a72b /packages/integrations/react/client.js
parent678c2b7523c7f10cfdf2eb5a73aa2bbb7e5cbc07 (diff)
downloadastro-8666f22a0f845973de28cddd358861f65981f168.tar.gz
astro-8666f22a0f845973de28cddd358861f65981f168.tar.zst
astro-8666f22a0f845973de28cddd358861f65981f168.zip
[ci] format
Diffstat (limited to 'packages/integrations/react/client.js')
-rw-r--r--packages/integrations/react/client.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/packages/integrations/react/client.js b/packages/integrations/react/client.js
index 0579f4a08..fc952522b 100644
--- a/packages/integrations/react/client.js
+++ b/packages/integrations/react/client.js
@@ -2,14 +2,12 @@ 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,
props,
- children != null
- ? createElement(StaticHtml, { value: children })
- : children
+ children != null ? createElement(StaticHtml, { value: children }) : children
);
if (client === 'only') {
return createRoot(element).render(componentEl);