question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Preact 10.x unnecessarily updates DOM for <select> options

See original GitHub issue

Describe 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:

  1. Open Chrome Dev Tools and inspect select element options
  2. Click on ‘Render’ button
  3. See that every option’s value is updated (highlighted with pink)

Expected behavior DOM is not updated at all

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
developitcommented, Jun 7, 2021

Yep, this is on the radar. That whole behavior is being removed in Preact 11, as it is a workaround for Internet Explorer 11.

0reactions
JoviDeCroockcommented, Jul 14, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found