npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

eslint-plugin-use-no-memo

v1.1.0

Published

ESLint plugin for "use no memo" directive with React libraries incompatible with React Compiler

Readme

eslint-plugin-use-no-memo

ESLint plugin for enforcing the "use no memo" directive with React libraries incompatible with React Compiler.

The React Compiler automatically optimizes React components by memoizing expensive operations. However, some React libraries are incompatible with this automatic memoization and require the 'use no memo' directive to opt out of React Compiler optimizations.

This ESLint plugin helps you automatically detect when you're using incompatible hooks and either warns you to add the directive or automatically fixes it for you.

Supported Libraries

This plugin currently supports the following libraries and hooks:

  • react-hook-form: useForm hook (Issue #12298)
  • @tanstack/react-table: useReactTable hook (Issue #5567)
  • material-react-table: useMaterialReactTable hook

Installation

npm install --save-dev eslint-plugin-use-no-memo

Configuration

ESLint Flat Config (eslint.config.js)

For ESLint v9+ with flat config:

import useNoMemo from 'eslint-plugin-use-no-memo';

export default [
  {
    plugins: {
      'use-no-memo': useNoMemo,
    },
    rules: {
      'use-no-memo/react-hook-form': 'error',
      'use-no-memo/tanstack-table': 'error',
      'use-no-memo/material-react-table': 'error',
    },
  },
];

Legacy ESLint Config (.eslintrc.js)

For older ESLint versions:

module.exports = {
  plugins: ['use-no-memo'],
  rules: {
    'use-no-memo/react-hook-form': 'error',
    'use-no-memo/tanstack-table': 'error',
    'use-no-memo/material-react-table': 'error',
  },
};

Rules

use-no-memo/react-hook-form

Enforces the 'use no memo' directive when using useForm from react-hook-form.

❌ Incorrect

import { useForm } from 'react-hook-form';

function MyComponent() {
  const form = useForm();
  // ... rest of component
}

✅ Correct

import { useForm } from 'react-hook-form';

function MyComponent() {
  'use no memo';
  const form = useForm();
  // ... rest of component
}

use-no-memo/tanstack-table

Enforces the 'use no memo' directive when using useReactTable from @tanstack/react-table.

❌ Incorrect

import { useReactTable } from '@tanstack/react-table';

function MyComponent() {
  const table = useReactTable({
    // ... table config
  });
}

✅ Correct

import { useReactTable } from '@tanstack/react-table';

function MyComponent() {
  'use no memo';
  const table = useReactTable({
    // ... table config
  });
  // ... rest of component
}

### `use-no-memo/material-react-table`

Enforces the `'use no memo'` directive when using `useMaterialReactTable` from material-react-table.

#### ❌ Incorrect

```jsx
import { useMaterialReactTable } from 'material-react-table';

function MyComponent() {
  const table = useMaterialReactTable({
    // ... table config
  });
}

✅ Correct

import { useMaterialReactTable } from 'material-react-table';

function MyComponent() {
  'use no memo';
  const table = useMaterialReactTable({
    // ... table config
  });
}