From 68beb467a64e7906629980e1b2cf45cea3b60cf6 Mon Sep 17 00:00:00 2001 From: Wesley Luyten Date: Fri, 27 Sep 2024 11:19:44 -0500 Subject: [PATCH] fix: suppressHydrationWarning bug --- scripts/react/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/react/build.js b/scripts/react/build.js index 320ed33ec..a8eb8a64f 100644 --- a/scripts/react/build.js +++ b/scripts/react/build.js @@ -34,7 +34,7 @@ const toReactComponentStr = (config) => { const ReactComponentName = toPascalCase(elementName); return `/** @type { import("react").HTMLElement } */ const ${ReactComponentName} = React.forwardRef(({ children = [], ...props }, ref) => { - return React.createElement('${elementName}', toNativeProps({ ...props, suppressHydrationWarning: true, ref }), children); + return React.createElement('${elementName}', { ...toNativeProps(props), ref, suppressHydrationWarning: true }, children); });`; };