Skip to content

Commit 35f9e7d

Browse files
committed
Handles fix on server-side rather than client-side
1 parent 4ab15d4 commit 35f9e7d

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/js/packages/@reactpy/client/src/vdom.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,6 @@ export function createAttributes(
142142
model: ReactPyVdom,
143143
client: ReactPyClientInterface,
144144
): { [key: string]: any } {
145-
// Add key to attributes
146-
if (model.key) {
147-
if (model.attributes) {
148-
model.attributes.key = model.key;
149-
} else {
150-
model.attributes = { key: model.key };
151-
}
152-
}
153145
return Object.fromEntries(
154146
Object.entries({
155147
// Normal HTML attributes

src/reactpy/core/vdom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def __call__(
148148
) -> VdomDict:
149149
"""The entry point for the VDOM API, for example reactpy.html(<WE_ARE_HERE>)."""
150150
attributes, children = separate_attributes_and_children(attributes_and_children)
151-
key = attributes.pop("key", None)
151+
key = attributes.get("key", None)
152152
attributes, event_handlers = separate_attributes_and_event_handlers(attributes)
153153
if REACTPY_CHECK_JSON_ATTRS.current:
154154
json.dumps(attributes)

0 commit comments

Comments
 (0)