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

Fixing issue #128: Default Props Error #1

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

AsjidAle
Copy link
Owner

@AsjidAle AsjidAle commented Dec 1, 2024

This PR addresses the issue reported in jcmcneal#128, where a warning is displayed for using defaultProps in function components. The warning indicates that support for defaultProps will be removed in future major React releases.

Issue was this
image

Changes:

  1. Replaced the defaultProps with JavaScript default parameters in the function signature of the Step functional component.
  2. Ensured proper initialization of default values without altering the component's existing functionality.

Notes:

  • The functionality and behavior of the component remain unchanged.
  • This is a refactor aimed at future-proofing the codebase and resolving the deprecation warning.
  • Thorough testing has been conducted to confirm that the component behaves as expected after the update.

This refactor ensures compatibility with upcoming React updates while addressing the reported issue.

…ers for functional components

This PR addresses the deprecation warning related to the use of defaultProps in functional components, as seen in the warning message pointed in issue# 128:

Warning: y: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
@AsjidAle AsjidAle merged commit b407bf9 into master Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant