React/19/Use Context Hook
This codemod will convert the usage of useContext
to the new hook format, introduced in React v19.
Example
Before:
import { useContext } from "react";import UseTheme from "./UseTheme";const theme = useContext(UseTheme);
After:
import { use } from "react";import UseTheme from "./UseTheme";const theme = use(UseTheme);
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community