---
title: "React 18 Legacy Context Migration - Air Market"
description: "You have old React context code in class components and need it on the modern API. This gives the complete migration pattern, and stresses that the provider and every consumer have to move together.…"
canonical: "https://airmarket.ai/app/react18-legacy-context"
---

[Air Market](/) / [Developer Tools](/category/devtools) / React 18 Legacy Context Migration

Skill by [GitHub](/@github)

# React 18 Legacy Context Migration

Move provider and consumers together, or it breaks at runtime

## What this does

You have old React context code in class components and need it on the modern API. This gives the complete migration pattern, and stresses that the provider and every consumer have to move together. Read it before touching that code, because doing half the job causes a failure at runtime.

### Top 3 things it does for you

- Migrate legacy context to createContext
- Find every consumer that has to change with the provider
- Get out of contextTypes and childContextTypes safely

## Information

**React 18 Legacy Context Migration at a glance**

|  |  |
| --- | --- |
| Kind | Skill |
| Publisher | [GitHub](/@github) |
| Category | [Developer Tools](/category/devtools) |
| Works with | Agent Skills - an open standard supported by 40+ agents |
| Size | 16 KB |
| Licence | MIT |
| Repository | [github/awesome-copilot](https://github.com/github/awesome-copilot/tree/90921cc46f4e452ea379e70884d60ec25263f16a/skills/react18-legacy-context) |
| GitHub stars | 38,187 (as of Nov 2026) |
| Installs | 747, counted by skills.sh (Nov 2026) |

## Security report

**Verified.** AIR scanned this exact version of React 18 Legacy Context Migration and flagged nothing. AIR's verdict: **safe**.

**What React 18 Legacy Context Migration's check was run against**

|  |  |
| --- | --- |
| Commit | 90921cc46f4e452ea379e70884d60ec25263f16a |
| Content hash | 62d4bac0f3beeafc3134da151d25b0d2495a7a817249d6115ebd08938a5ed05d |
| Files read | [Browse the files at this exact commit](https://github.com/github/awesome-copilot/blob/90921cc46f4e452ea379e70884d60ec25263f16a/skills/react18-legacy-context/SKILL.md) |

A scan is named by the exact content it read, not by a version number. A different version is a different artifact, and nothing here applies to a version AIR has not scanned.

[Read the full security report for React 18 Legacy Context Migration](/security/react18-legacy-context)

## About React 18 Legacy Context Migration

This gives the complete migration pattern for React's legacy context API - contextTypes, childContextTypes, getChildContext - over to the modern createContext API, in class components.

The point it insists on is that this is always a cross-file migration: the provider and all its consumers must be updated together. Migrating only the provider without the consumers, or the other way round, causes a runtime failure.

Its own instruction is to read it before writing any context migration, because the cross-file coordination steps are what prevent the most common bugs in this kind of change.

## What's inside

- SKILL.md - instructions
- references/context-file-template.md - reference
- references/multi-context.md - reference
- references/single-context.md - reference

## Questions

### Is React 18 Legacy Context Migration safe to install?

AIR scanned this exact version of React 18 Legacy Context Migration and flagged nothing. AIR's verdict: safe. The verdict is named by the content that was read, at commit 90921cc46f4e, so it cannot drift onto a version nobody scanned. The full report is at https://airmarket.ai/security/react18-legacy-context.

### How do I install React 18 Legacy Context Migration?

Open https://airmarket.ai/app/react18-legacy-context on Air Market and use the install action: Air Market hands Claude a prompt naming this exact skill, and Claude sets it up. Source, pinned to the exact commit this listing describes: https://github.com/github/awesome-copilot/tree/90921cc46f4e452ea379e70884d60ec25263f16a/skills/react18-legacy-context. Install from that link, not the branch.

## Related on Air Market

- [More Developer Tools listings](/category/devtools)
- [Everything by GitHub](/@github)

---

Canonical URL: <https://airmarket.ai/app/react18-legacy-context>
