Guides
Learn more with hands-on guides.
addImport(importString)
Adds import to js file. Accepts code with imports and automatically merges file imports with provided imports.
import { files } from '@codemod.com/workflow' await files .jsFam(({ addImport }) => { addImport('import { useEffect } from "react"') })
Full import line, e.g. import { useEffect } from "react".
import { useEffect } from "react"
Was this page helpful?