[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [local‑first/Query](https://evolu.dev/docs/api-reference/common/local-first/Query) › makePatches

```ts
function makePatches(
  previousRows: readonly Row[] | undefined,
  nextRows: readonly Row[],
): readonly Patch[];
```

Defined in: [packages/common/src/local-first/Query.ts:278](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/local-first/Query.ts#L278)

We detect only changes in the whole result and in-place edits. In the future,
we will add more heuristics. We will probably not implement the Myers diff
algorithm because it's faster to rerender all than to compute many detailed
patches. We will only implement logic a developer would implement manually,
if necessary.