MartinP460 / react-denmark-map

Customizable plug-and-play map of Denmark for visual presentation🗺️
https://react-denmark-map.vercel.app/
MIT License
21 stars 4 forks source link

[V2] Switch to Javascript default parameters #16

Closed MartinP460 closed 9 months ago

MartinP460 commented 10 months ago

⚠️ Important: This issue is part of the version 2.0 release. Make sure to read the v2 contributing guidelines. Checkout from the v2 branch when creating the branch and open a PR towards this branch. ⚠️

Description

Default props (defaultProps) in React are a thing of the past and may cause deprecation warnings to show up in the console. As such, we should use a different mechanism.

Proposed solution

Remove the use of defaultProps. This could ideally use destructuring default values as shown in this Stack Overflow post. These changes should be made in the Map component.