react-modernization

react-modernization is a skill for Claude Code, Codex from mattmre/EVOKORE-MCP-PUBLIC. It costs 43 tokens per session (2,965 once invoked), scanned A, a copy of react-modernization, MIT.

A guide for updating React applications, including moving class components to hooks and adopting newer React features.

In plain words
What is it for?
Use it to upgrade React, convert class components, apply codemods, update state-management patterns, and move code toward TypeScript.
Why use it?
It helps plan and carry out changes in older React code while handling version differences and refactoring work.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to upgrade React, convert class components, apply codemods, update state-management patterns, and move code toward TypeScript.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mattmre/evokore-mcp-public/react-modernization
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mattmre/EVOKORE-MCP-PUBLIC --skill react-modernization
Clone the repo
git clone --depth 1 https://github.com/mattmre/EVOKORE-MCP-PUBLIC

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for react-modernization

README.md
[![agentmods](https://agentmods.dev/badge/skills/mattmre/evokore-mcp-public/react-modernization/github.svg)](https://agentmods.dev/skills/mattmre/evokore-mcp-public/react-modernization)
Your own site
<a href="https://agentmods.dev/skills/mattmre/evokore-mcp-public/react-modernization"><img src="https://agentmods.dev/badge/skills/mattmre/evokore-mcp-public/react-modernization/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for react-modernization

Your own site · 80×15
<a href="https://agentmods.dev/skills/mattmre/evokore-mcp-public/react-modernization"><img src="https://agentmods.dev/badge/skills/mattmre/evokore-mcp-public/react-modernization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,965 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.02965
Opus 5 $0.00022 $0.01483
Sonnet 5 $0.00009 $0.00593
Haiku 4.5 $0.00004 $0.00297

Measured 5d ago against content hash 02cb5ac31542, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

react-modernization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to react-modernization — 125 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

SKILLS/WSHOBSON PLUGINS/framework-migration/react-modernization/SKILL.md · 529 lines

How it starts

The opening of the file, as written. The whole thing — 529 lines — stays where its author put it; the contents beside it link to each section on GitHub.

React Modernization

Master React version upgrades, class to hooks migration, concurrent features adoption, and codemods for automated transformation.

When to Use This Skill

  • Upgrading React applications to latest versions
  • Migrating class components to functional components with hooks
  • Adopting concurrent React features (Suspense, transitions)
  • Applying codemods for automated refactoring
  • Modernizing state management patterns
  • Updating to TypeScript
  • Improving performance with React 18+ features

Version Upgrade Path

React 16 → 17 → 18

Breaking Changes by Version:

React 17:

  • Event delegation changes
  • No event pooling
  • Effect cleanup timing
  • JSX transform (no React import needed)

React 18:

  • Automatic batching
  • Concurrent rendering
  • Strict Mode changes (double invocation)
  • New root API
  • Suspense on server

Class to Hooks Migration

State Management

// Before: Class component
class Counter extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      count: 0,
      name: "",
    };
  }

  increment = () => {
    this.setState({ count: this.state.count + 1 });
  };

  render() {
    return (
      <div>
        <p>Count: {this.state.count}</p>
        <button onClick={this.increment}>Increment</button>
      </div>
    );
  }
}

// After: Functional component with hooks
function Counter() {
  const [count, setCount] = useState(0);
  const [name, setName] = useState("");

  const increment = () => {
    setCount(count + 1);
  };

  return (
    <div>
      <p>Count: {count}</p>
      <button onClick={increment}>Increment</button>
    </div>
  );
}

Lifecycle Methods to Hooks

// Before: Lifecycle methods
class DataFetcher extends React.Component {
  state = { data: null, loading: true };

  componentDidMount() {
    this.fetchData();
  }

  componentDidUpdate(prevProps) {
    if (prevProps.id !== this.props.id) {
      this.fetchData();
    }
  }

  componentWillUnmount() {
    this.cancelRequest();
  }

  fetchData = async () => {
    const data = await fetch(`/api/${this.props.id}`);
    this.setState({ data, loading: false });
  };

  cancelRequest = () => {
    // Cleanup
  };

  render() {
    if (this.state.loading) return <div>Loading...</div>;
    return <div>{this.state.data}</div>;
  }
}

// After: useEffect hook
function DataFetcher({ id }) {
  const [data, setData] = useState(null);
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    let cancelled = false;

    const fetchData = async () => {
      try {
        const response = await fetch(`/api/${id}`);
        const result = await response.json();

        if (!cancelled) {
          setData(result);
          setLoading(false);
        }
      } catch (error) {
        if (!cancelled) {
          console.error(error);
        }
      }
    };

    fetchData();

    // Cleanup function
    return () => {
      cancelled = true;
    };
  }, [id]); // Re-run when id changes

  if (loading) return <div>Loading...</div>;
  return <div>{data}</div>;
}

Read the full file on GitHub · 529 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 529 lines · 43 tokens per session scan A 02cb5ac31542

Subscribe to this mod's changes

react-modernization is a skill published in the GitHub repository mattmre/EVOKORE-MCP-PUBLIC (3 stars, last pushed 3mo ago), licensed MIT. It adds 43 tokens to every session and 2,965 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to react-modernization, differing in 125 lines, and is treated as a copy.