---
url: /docs/guide/usage/linter/rules/react/incompatible-library.md
---

### What it does

Warns on usage of library APIs known to be incompatible with
memoization (manual or automatic), such as `react-hook-form`'s
`watch()`, TanStack Table's `useReactTable()`, and TanStack Virtual's
`useVirtualizer()`.

Powered by the React Compiler, which runs once per file and is shared
with the other React Compiler rules. Port of
[`react-hooks/incompatible-library`](https://react.dev/reference/eslint-plugin-react-hooks/lints/incompatible-library).

### Why is this bad?

These APIs rely on components re-rendering on every change;
memoization — by the compiler or by hand — breaks their update model,
so the UI stops reflecting new data.

### Examples

Examples of **incorrect** code for this rule:

```jsx
import { useReactTable } from "@tanstack/react-table";
function Component({ columns, data }) {
  const table = useReactTable({ columns, data });
  return <div>{table.getRowModel().rows.length}</div>;
}
```

Examples of **correct** code for this rule:

```jsx
function Component({ rows }) {
  return <div>{rows.length}</div>;
}
```

## How to use

## Version

This rule was added in v1.79.0.

## References
