ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

react-modernization

Skill by wpank

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/wpank/react-modernization
Or

React Modernization

Upgrade React applications from class components to hooks, adopt concurrent features, and migrate between major versions.

WHAT

Systematic patterns for modernizing React codebases:

  • Class-to-hooks migration with lifecycle method mappings
  • React 18/19 concurrent features adoption
  • TypeScript migration for React components
  • Automated codemods for bulk refactoring
  • Performance optimization with modern APIs

WHEN

  • Migrating class components to functional components with hooks
  • Upgrading React 16/17 apps to React 18/19
  • Adopting concurrent features (Suspense, transitions, use)
  • Converting HOCs and render props to custom hooks
  • Adding TypeScript to React projects

KEYWORDS

react upgrade, class to hooks, useEffect, useState, react 18, react 19, concurrent, suspense, transition, codemod, migrate, modernize, functional component

Installation

OpenClaw / Moltbot / Clawbot

npx clawhub@latest install react-modernization

Version Upgrade Paths

React 17 → 18 Breaking Changes

ChangeImpactMigration
New root APIRequiredReactDOM.rendercreateRoot
Automatic batchingBehaviorState updates batch in async code now
Strict ModeDev onlyEffects fire twice (mount/unmount/mount)
Suspense on serverOptionalEnable SSR streaming

React 18 → 19 Breaking Changes

ChangeImpactMigration
use() hookNew APIRead promises/context in render
ref as propSimplifiedNo more forwardRef needed
Context as providerSimplified<Context> not <Context.Provider>
Async actionsNew patternuseActionState, useOptimistic

Class to Hooks Migration

Lifecycle Method Mappings

// componentDidMount → useEffect with empty deps
useEffect(() => {
  fetchData()
}, [])

// componentDidUpdate → useEffect with deps
useEffect(() => {
  updateWhenIdChanges()
}, [id])

// componentWillUnmount → useEffect cleanup
useEffect(() => {
  const subscription = subscribe()
  return () => subscription.unsubscribe()
}, [])

// shouldComponentUpdate → React.memo
const Component = React.memo(({ data }) => <div>{data}</div>)

// getDerivedStateFromProps → useMemo
const derivedValue = useMemo(() => computeFrom(props), [props])

State Migration Pattern

Metadata

Author@wpank
Stars919
Views0
Updated2026-02-12
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-wpank-react-modernization": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.