Skip to content

Commit 9e72ca0

Browse files
committed
Fix potential key identity bug of router component children
1 parent 6557000 commit 9e72ca0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/reactpy_router/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,13 @@ def router_component(
6363

6464
if match is not None:
6565
element, params = match
66-
return html._(
66+
return html.div(
6767
ConnectionContext(
6868
_route_state_context(element, value=_RouteState(set_location, params)),
6969
value=Connection(old_conn.scope, location, old_conn.carrier),
7070
),
7171
_history({"on_change": lambda event: set_location(Location(**event))}),
72+
key=location.pathname + select,
7273
)
7374

7475
return None

0 commit comments

Comments
 (0)