openedx / openedx/paragon

Support for defaultProps will be removed from function components in a future major release.

Open
#3,043 6 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.