Skip to content

Commit fae87ed

Browse files
committed
fix: react key warning in SSR
1 parent d0642a2 commit fae87ed

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"type": "git",
1111
"url": "https://github.com/bfanger/svelte-preprocess-react.git"
1212
},
13-
"version": "0.12.0",
13+
"version": "0.13.0",
1414
"license": "MIT",
1515
"type": "module",
1616
"scripts": {

src/lib/sveltify.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,14 @@ export default function sveltify<P>(
8282
props,
8383
[
8484
React.createElement("svelte-slot", {
85+
key: "svelte-slot",
8586
style: { display: "contents" },
8687
dangerouslySetInnerHTML: { __html: html },
8788
}),
8889
...current.map((child, i) =>
8990
React.createElement(
9091
`ssr-portal${i}`,
91-
null,
92+
{ key: `ssr-portal${i}` },
9293
React.createElement(child.reactComponent, child.props)
9394
)
9495
),

0 commit comments

Comments
 (0)