> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# dom-layout-thrashing

> A loop reads layout metrics and mutates DOM styles or classes, forcing a reflow on each iteration.

## What it flags

A loop reads layout metrics and mutates DOM styles or classes, forcing a reflow on each iteration.

For a binary search that writes a text prefix, measures that same element and uses the measurement to shrink the search interval, the rule gives contextual advice. Review whether an off-DOM measurement can preserve the result. In this pattern, the next prefix depends on the current measurement.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "dom-layout-thrashing": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.