Support for defaultProps will be removed from function components in a future major release.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 140
- Forks
- 100
- Avg merge
- 1h 3m
- Merged PRs (30d)
- 30
Description
Feedback summary
Using React 18 I started to notice these warning messages for default props.
Warning: FormGroup: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
The console gets crowded with many of these messages, making it hard to check actual errors or any other important debug messages.
Improvements
Migrating default props to normal JS parameters.
CC: @adamstankiewicz
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by searching the component sources for function components that define defaultProps, then review how their props are declared and covered by existing tests. Done means the affected components no longer produce the reported React warning while preserving their default values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100