nitter
mike douges
@douges
Sep 4
react portals that retain browser state with element.moveBefore
Sep 4, 2026 路 10:33 AM UTC
2
3
74
5,295
mike douges
@douges
Sep 5
update: ended up patching react so it can commit in render rather than an effect 馃檲
119
Sort replies:
Relevant
Recent
Liked
jovi 馃惃
@JoviDeC
Sep 4
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
mike douges
@douges
Sep 4
hell yeah 馃檶
2
351