2 ms·
That looks like it replaces the entire document every time state changes. How's the performance of that?
by simonw 2y ago
That looks like it replaces the entire document every time state changes. How's the performance of that?
- WickyNilliams 2y agoEven if performance is fine, the big usability issue is that it will blow away focus, cursor position etc every render. Gets very painful for keyboard use, and of course is a fatal accessibility flaw
- efortis 2y agoyes, that’s the downside, focus is lost on init()
- WickyNilliams 2y agoReally wish the browser gave us better APIs for updating the DOM. Creation is extremely easy, but after that you either have to invent some reconciliation system or stick with imperative updates