[Bug] React 19: "Warning: Invalid prop `source` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props."

オープン
#2,410 コメント 1 件 リアクション 5 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
nextjs, react, typescript

調査の方向性

まず、React 19、Next.js 15、react-map-gl 7.1.7、maplibre-gl 4.3.2 で警告を再現します。node_modules/react-map-gl/dist/esm/components/source.js の 76 行目付近と SourcesLayersAtlasGeo のスタックエントリを調べ、警告の発生元が react-map-gl なのか依存関係なのかを特定します。報告されたセットアップで警告が出力されなくなり、その動作が回帰チェックでカバーされれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug
Description

I am testing ReactMapGL in React 19 with React Compiler and Next JS 15. I am getting this warning with ReactMapGL and Tailwind HeadlessUI about Fragments and Props.

This might be something temporary in one of the canary releases …
And I am not sure it it comes from React 19 (Probably), Next JS or the Compiler.

Warning: Invalid prop `source` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.
    at Source (webpack-internal:///(app-pages-browser)/./node_modules/react-map-gl/dist/esm/components/source.js:76:64)
    at SourcesLayersAtlasGeoMemoized (webpack-internal:///(app-pages-browser)/./src/app/regionen/[regionSlug]/_components/Map/SourcesAndLayers/SourcesLayersAtlasGeo.tsx:46:13)
    at SourcesLayersAtlasGeo (webpack-internal:///(app-pages-browser)/./src/app/regionen/[regionSlug]/_components/Map/SourcesAndLayers/SourcesLayersAtlasGeo.tsx:172:72)
    at div
    at div
    at Map (webpack-internal:///(app-pages-browser)/./node_modules/react-map-gl/dist/esm/exports-maplibre.js:52:71)
    at Map (webpack-internal:///(app-pages-browser)/./src/app/regionen/[regionSlug]/_components/Map/Map.tsx:56:143)
    at div
    at MapProvider (webpack-internal:///(app-pages-browser)/./node_modules/react-map-gl/dist/esm/components/use-map.js:15:74)
    at MapInterface (webpack-internal:///(app-pages-browser)/./src/app/regionen/[regionSlug]/_components/MapInterface.tsx:42:72)
    at ShowRegionPage (Server)
Expected Behavior

No response

Steps to Reproduce
Environment
  • Framework version: "react-map-gl": "7.1.7",
  • Map library:"maplibre-gl": "4.3.2",
  • Browser:Chrome
  • OS:macOS
Logs

No response

主要言語
TypeScript
スター
8.5k
フォーク
1.3k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

visgl/react-map-gl のほかの issue

visgl/react-map-gl の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。