1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【備忘録】ChakraUIのv2→v3で変わっていたこと

1
Last updated at Posted at 2025-07-06

やりたいこと

npm install @chakra-ui/reactをすると、v3のChakraUIがインストールされてv2の書き方だとエラーが出るので解消したい。

実装

main.tsxなどでChakraProvideを設定するが、以下に書き方を変える。

// v2
<ChakraProvider>
 <App />
</ChakraProvider>

// v3
<ChakraProvider value={defaultSystem}>
 <App />
</ChakraProvider>

詰まっていたところ

今までv2を使っていたので、他にもCardが読み込めなかったりしていた。
以下でv3で変わっていることを参照。

公式のドキュメントはv2までなので、v3を使うか迷う。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?