Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@/climatemappedafrica - chore: remove defaultProps in functional components #864

Merged
merged 15 commits into from
Aug 30, 2024

Conversation

m453h
Copy link
Contributor

@m453h m453h commented Aug 29, 2024

Description

This PR removes defaultProps which are depecrated in React 18 and will be removed in React 19 in favour of ES6 default parameters in all functional components in the climatemappedafrica.

This is the first step towards implementing these changes across all apps in this repo.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@m453h m453h added the chore A task that needs to be done (neither enhancement or bug) label Aug 29, 2024
@m453h m453h self-assigned this Aug 29, 2024
Yes, I agree. Initially, I thought moving everything from defaultProps to the function parameters would add value, but I later realized it was unnecessary verbosity. Looks like I forgot to change this one !

Co-authored-by: KEVIN KOECH <koechkevin92@gmail.com>
@m453h m453h requested a review from a team August 29, 2024 12:37
Copy link
Member

@kilemensi kilemensi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽

m453h and others added 6 commits August 30, 2024 11:23
Co-authored-by: Clemence Kyara <kilemensi@users.noreply.github.com>
…ub.com:CodeForAfrica/ui into chore/climatemappedafrica-remove-default-props
…anel/PanelItem.js

Co-authored-by: Clemence Kyara <kilemensi@users.noreply.github.com>
…ub.com:CodeForAfrica/ui into chore/climatemappedafrica-remove-default-props
@m453h m453h requested review from koechkevin and kilemensi August 30, 2024 08:53
@m453h m453h mentioned this pull request Aug 30, 2024
5 tasks
@m453h m453h added this pull request to the merge queue Aug 30, 2024
Merged via the queue into main with commit 1daa3e4 Aug 30, 2024
4 checks passed
@m453h m453h deleted the chore/climatemappedafrica-remove-default-props branch August 30, 2024 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore A task that needs to be done (neither enhancement or bug)
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants