trpfrog / trpfrog.net

A monorepo for my personal website, trpfrog.net, built with Next.js and TypeScript.
https://trpfrog.net
4 stars 1 forks source link

Remove "import React from 'react'" #56

Closed trpfrog closed 9 months ago

trpfrog commented 9 months ago

React 17 より JSX を使う場合に import React from 'react' しなくて良くなっているそうなので、不要な import 文を削除した。移行には以下のように codemod を利用し、自動変換できなかった部分は手動で調整した。(TS の satisfies が含まれているファイル?が自動変換に対応していないようだった)

npx react-codemod update-react-imports ./src

source: https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html

vercel[bot] commented 9 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
trpfrog-net ✅ Ready (Inspect) Visit Preview Dec 13, 2023 5:46am