Skip to content

Commit 81d7359

Browse files
committed
fix behavior with react hot reload
1 parent 8d9684f commit 81d7359

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/view.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ export default function view (Comp) {
2424
scheduler: () => setState({}),
2525
lazy: true
2626
}),
27-
[]
27+
// Adding the original Comp here is necessary to make React Hot Reload work
28+
// it does not affect behavior otherwise
29+
[Comp]
2830
)
2931

3032
// cleanup the reactive connections after the very last render of the component

0 commit comments

Comments
 (0)