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

Đang mở
#2,410 1 bình luận 5 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
nextjs, react, typescript

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện cảnh báo với React 19, Next.js 15, react-map-gl 7.1.7 và maplibre-gl 4.3.2. Kiểm tra node_modules/react-map-gl/dist/esm/components/source.js quanh dòng 76 và các mục stack của SourcesLayersAtlasGeo để xác định cảnh báo bắt nguồn từ react-map-gl hay một dependency. Được xem là hoàn tất khi cảnh báo không còn được phát ra trong thiết lập được báo cáo và hành vi này được bao phủ bằng một kiểm tra hồi quy.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
8.5k
Fork
1.3k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của visgl/react-map-gl

Tất cả issue của visgl/react-map-gl

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.