0
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?

Sigma.jsをReactで使おうとして "TypeError: Cannot read properties of undefined (reading 'ReactCurrentOwner')" になったら

Last updated at Posted at 2024-12-20

結論

おそらく依存関係のどこかがReact19系列と互換性に問題があり、そのために下記エラーが生じる。

TypeError: Cannot read properties of undefined (reading 'ReactCurrentOwner')

理想的にはReact19系列でも動くアプローチを取りたいが、現時点ではReact関連パッケージをReact18系列にダウングレードしてやるのが無難。(筆者はReact 19.0.0から18.3.1にバージョンを落とすことで解消した)

背景

Sigma.jsのReactのデモを個人的に動かしているAstroのプロジェクト内に組み込もうとして冒頭のエラーが生じた(組み込み時に、デモではReact v18系列だったがReact v19系列に引き上げて動かそうと試みていた)

参考

状況は違えど類似事象ありの模様。

0
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
0
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?