Development
react18-legacy-context - Claude MCP Skill
Provides the complete migration pattern for React legacy context API (contextTypes, childContextTypes, getChildContext) to the modern createContext API. Use this skill whenever migrating legacy context in class components - this is always a cross-file migration requiring the provider AND all consumers to be updated together. Use it before touching any contextTypes or childContextTypes code, because migrating only the provider without the consumers (or vice versa) will cause a runtime failure. Always read this skill before writing any context migration - the cross-file coordination steps here prevent the most common context migration bugs.
SEO Guide: Enhance your AI agent with the react18-legacy-context tool. This Model Context Protocol (MCP) server allows Claude Desktop and other LLMs to provides the complete migration pattern for react legacy context api (contexttypes, childcontexttype... Download and configure this skill to unlock new capabilities for your AI workflow.
Documentation
SKILL.md# React 18 Legacy Context Migration Legacy context (`contextTypes`, `childContextTypes`, `getChildContext`) was deprecated in React 16.3 and warns in React 18.3.1. It is **removed in React 19**. ## This Is Always a Cross-File Migration Unlike most other migrations that touch one file at a time, context migration requires coordinating: 1. Create the context object (usually a new file) 2. Update the **provider** component 3. Update **every consumer** component Missing any consumer leaves the app broken - it will read from the wrong context or get `undefined`. ## Migration Steps (Always Follow This Order) ``` Step 1: Find the provider (childContextTypes + getChildContext) Step 2: Find ALL consumers (contextTypes) Step 3: Create the context file Step 4: Update the provider Step 5: Update each consumer (class components → contextType, function components → useContext) Step 6: Verify - run the app, check no legacy context warnings remain ``` ## Scan Commands ```bash # Find all providers grep -rn "childContextTypes\|getChildContext" src/ --include="*.js" --include="*.jsx" | grep -v "\.test\." # Find all consumers grep -rn "contextTypes\s*=" src/ --include="*.js" --include="*.jsx" | grep -v "\.test\." # Find this.context usage (may be legacy or modern - check which) grep -rn "this\.context\." src/ --include="*.js" --include="*.jsx" | grep -v "\.test\." ``` ## Reference Files - **`references/single-context.md`** - complete migration for one context (theme, auth, etc.) with provider + class consumer + function consumer - **`references/multi-context.md`** - apps with multiple legacy contexts (nested providers, multiple consumers of different contexts) - **`references/context-file-template.md`** - the standard file structure for a new context module
Signals
Information
- Repository
- github/awesome-copilot
- Author
- github
- Last Sync
- 5/10/2026
- Repo Updated
- 5/10/2026
- Created
- 4/10/2026
Reviews (0)
No reviews yet. Be the first to review this skill!
Related Skills
CLAUDE
CLAUDE.md
receiving-code-review
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
mem0-integrate
Integrate Mem0 into an existing repository using a goal-driven, TDD pipeline. Detects the repo's language automatically and asks the user to pick between Mem0 Platform (managed) and Mem0 Open Source (self-hosted). Writes failing tests before any implementation. Produces a local feature branch plus `.mem0-integration/` artifacts consumed by the paired verification skill. TRIGGER when: user says "integrate mem0", "add mem0 to this repo", "wire mem0 into <repo>", or asks how to add memory to an existing project. DO NOT TRIGGER when: the user wants general SDK usage (use skill:mem0), CLI usage (use skill:mem0-cli), or Vercel AI SDK (use skill:mem0-vercel-ai-sdk). After success, invoke skill:mem0-test-integration to verify in the same workspace (loose coupling).
Related Guides
Mastering Python and TypeScript Development with the Claude Skill Guide
Learn how to use the python typescript guide Claude skill. Complete guide with installation instructions and examples.
Building Full-Stack Applications with Claude: The Node.js MongoDB JWT Express React Skill Guide
Learn how to use the nodejs mongodb jwt express react Claude skill. Complete guide with installation instructions and examples.
Next.js SEO Dev: The Essential Claude Skill for Documented React Development
Learn how to use the nextjs seo dev Claude skill. Complete guide with installation instructions and examples.