jcmcneal / react-step-wizard

A modern flexible step wizard component built for React.
MIT License
585 stars 128 forks source link

Fixing issue#128 default Props error #138

Open AsjidAle opened 1 day ago

AsjidAle commented 1 day ago

This PR addresses the issue reported in #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:

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