Interview Question

What is will-change property?

will-change is a temporary optimization hint, not a general speed switch.

💡 Concept ✅ Quick Revision 🎨 CSS

Answer

The will-change property gives the browser an advance hint about properties likely to change. • The browser may prepare optimizations before the change occurs. • It should be used briefly and only for changes that actually need preparation. • Overuse can consume memory and make performance worse.

💡 Simple Example

.menu.is-opening { will-change: transform; }

⚡ Quick Revision

will-change is a temporary optimization hint, not a general speed switch.