Question: What `will-change` is used for?
See original GitHub issueI see in https://github.com/bvaughn/react-window/blob/master/src/createListComponent.js#L276 that you’re using will-change: transform
. But from inspecting the demos it doesn’t seems that transform
is used anywhere
So, what will-change
is used for?
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
will-change - CSS: Cascading Style Sheets - MDN Web Docs
The will-change CSS property hints to browsers how an element is expected to change. Browsers may set up optimizations before an element is ......
Read more >will-change | CSS-Tricks
The will-change property in CSS optimizes animations by letting the browser know which properties and elements are just about to be ...
Read more >CSS Will Change Module Level 1 - W3C
Use will-change Sparingly In Stylesheets. Using will-change directly in a stylesheet implies that the targeted elements are always a few moments ...
Read more >How to use and how works CSS' will-change property?
So I have a few questions. Should I add this property to the element class or its hover state? .my-class{ will-change ...
Read more >CSS | will-change property - GeeksforGeeks
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have...
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
Without will-change, the scroll freezes until every item is rendered. You won’t see this on a modern CPU.
Reproduction steps on Chrome Windows:
What’s wrong:
At step 8. scrolling gets laggy.
Why bother?
The problem becomes noticeable when you have heavier items.
What about other will-change values?
@brunolemos FYI top and left produce the same effect as transform other will-change values have no effect
I suggest to reopen this issue. It adds little value and breaks
fixed
positions. Consider finding an alternative optimisation or not to optimise it at all.This seems to me more like a hack than a legitimate optimisation, because
will-change
actually influence the visual appearance of elements.