Preact 10.x unnecessarily updates DOM for <select> options
See original GitHub issueDescribe the bug
Preact 10.x unnecessarily updates DOM (options’s values specifically) for <select>
element even if it’s not changed.
To Reproduce https://codesandbox.io/s/objective-jepsen-g55oi
Steps to reproduce the behavior:
- Open Chrome Dev Tools and inspect select element options
- Click on ‘Render’ button
- See that every option’s value is updated (highlighted with pink)
Expected behavior DOM is not updated at all
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Forms | Preact: Fast 3kb React alternative with the same ES6 ...
The DOM has a bidirectional data flow, because every form control will manage the user input themselves. A simple text input will always...
Read more >Reconciliation - React
This article explains the choices we made in React's “diffing” algorithm so that component updates are predictable while being fast enough for ...
Read more >Comparing the best new JavaScript frameworks to React
Explore Aurelia, hyperHTML, Svelte, and Preact, the best new ... The virtual DOM is able to be frequently manipulated and updated, ...
Read more >Preact - Releases
Preact - ⚛️ Fast 3kB React alternative with the same modern API. ... 10.5.10 ... Reduce unnecessary DOM attribute reads (#2486, thanks @andrewiggins) ......
Read more >Using Preact to Cut Legacy Codes in Half | by TOAST UI
TOAST UI Grid is a UI library that enables users to handle complex tabular data on the web, and a major update of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, this is on the radar. That whole behavior is being removed in Preact 11, as it is a workaround for Internet Explorer 11.
Hmm I guess this IE11 workaround is the biggest issue here where we have to reset value and have it set later through the
diff
. This is not present in 11 but if this is causing issues we should look at an alternative workaround.