Skip to content

Warning: defaultProps usage in function components #77

@MichaelvdVeer

Description

@MichaelvdVeer

Describe the bug
The library currently uses defaultProps in function components, which triggers the following warning in React:

Warning: PinInput: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

To Reproduce
Steps to reproduce the behavior:

  1. Install and use react-input-pin-code in a React app.
  2. Check the console while using the component.
  3. Observe the warning about defaultProps.

Expected behavior
The library should avoid using defaultProps in function components and instead use JavaScript default parameters.

Package Version
"react-input-pin-code": "^1.2.1",

Desktop (please complete the following information):

  • OS: macOs Ventura 13.7.1
  • Browser: Chrome
  • Version: Chrome version 130.0.6723.117

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions