diff --git a/package.json b/package.json index 2acee11..912a31d 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "type": "git", "url": "https://github.com/bfanger/svelte-preprocess-react.git" }, - "version": "0.13.0", + "version": "0.14.0", "license": "MIT", "type": "module", "scripts": { diff --git a/src/lib/internal/Bridge.ts b/src/lib/internal/Bridge.ts index ad76022..5907d67 100644 --- a/src/lib/internal/Bridge.ts +++ b/src/lib/internal/Bridge.ts @@ -23,7 +23,7 @@ const Bridge: React.FC = ({ createPortal, node }) => { } const children: React.ReactElement[] = node.nodes.map((subnode) => { return React.createElement(Bridge, { - key: subnode.key, + key: `bridge${subnode.key}`, createPortal, node: subnode, }); @@ -38,7 +38,9 @@ const Bridge: React.FC = ({ createPortal, node }) => { } if (hooks.length >= 0) { children.push( - ...hooks.map(({ Hook, key }) => React.createElement(Hook, { key })) + ...hooks.map(({ Hook, key }) => + React.createElement(Hook, { key: `hook${key}` }) + ) ); } return createPortal(