Skip to content

Commit

Permalink
fix: suppressHydrationWarning bug
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Sep 27, 2024
1 parent f99f8ed commit 68beb46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/react/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});`;
};

Expand Down

0 comments on commit 68beb46

Please sign in to comment.