May I ask why `window.resize` is used over `matchMedia`[0] to detect DPR changes? Is one approach better than the other?
[0] https://developer.mozilla.org/en-US/docs/Web/API/Window/devi...
[0] https://developer.mozilla.org/en-US/docs/Web/API/Window/devi...