rnmapbox / rnmapbox/maps

[Bug]: Warning: Connect(Component): Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.

Open
#3,574 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug 🪲
Dominant language
Kotlin
Stars
2.9k
Forks
947
Avg merge
6d 37m
Merged PRs (30d)
1

Description

Mapbox Implementation

Mapbox

Mapbox Version

10.0.15

React Native Version

0.74.3

Platform

iOS, Android

@rnmapbox/maps version

10.1.28

Standalone component to reproduce
import React from 'react';
import {
  MapView,
  ShapeSource,
  LineLayer,
  Camera,
} from '@rnmapbox/maps';

const aLine = {
  type: 'LineString',
  coordinates: [
    [-74.00597, 40.71427],
    [-74.00697, 40.71527],
  ],
};

class BugReportExample extends React.Component {
  render() {
    return (
      <MapView style={{flex: 1}}>
        <Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
        <ShapeSource id="idStreetLayer" shape={aLine}>
          <LineLayer id="idStreetLayer" />
        </ShapeSource>
      </MapView>
    );
  }
}
Observed behavior and steps to reproduce

ERROR Warning: Connect(Component): Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.
in RNMBXMapView (created by MapView)
in RCTView (created by View)
in View (created by MapView)
in MapView (created by MapComponent)
in RCTView (created by View)

Expected behavior

No response

Notes / preliminary analysis

No response

Additional links and references

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not identify a source file or test. Start with the standalone React Native example and trace the RNMBXMapView/Connect warning on iOS and Android. Done means the reported defaultProps warning no longer appears while MapView, Camera, ShapeSource, and LineLayer still render.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.