react portals that retain browser state with element.moveBefore

Sep 4, 2026 路 10:33 AM UTC

2
3
74
5,295
update: ended up patching react so it can commit in render rather than an effect 馃檲
119
Sort replies: Relevant Recent Liked
Replying to @douges
moveBefore is so good, we're using it as a first-class citizen in Preact. moveBefore is used in lieu of insertBefore when it's available. Much less focus management, better perf and less state loss scenario's with child diffing!
2
6
515
hell yeah 馃檶
2
351