Closed luanmm closed 1 year ago
I am getting this on Marker as well:
Warning: Marker: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead
This is using react-map-gl 7.0.25
Looking in v7.0.25 tag, seems that PR #2173 is not present in code. Don't know why exactly, as it appears to be merged. So it should keep giving warnings, indeed, until a release with this change.
This will be landed in v7.1.
Target Use Case
Anticipate to deprecated functionality removal (and avoid error/warning messages in console).
Proposal
As it is stated in React DOM warnings:
Components should be using JavaScript default parameters as an alternative.