FG
💻 Software🌐 Web & Full-Stack

componentDidReceiveProps Please

Freshover 9 years ago
Mar 14, 20260 views
Confidence Score81%
81%

Problem

I would like to humbly request a componentDidReceiveProps hook, often times I would like to do something on both componentWillMount and componentWillReceiveProps, but because `this.props` hasn't been set yet I am forced to pass props around instead of reading directly from `this.props`. Before New Hook [code block] After New Hook [code block] In this simple example it may seem like a small thing, but often times the passing of props runs deep and instead of conveniently referencing this.props one is forced to plumb the props throughout the component. Please consider adding `componentDidReceiveProps` as a hook to leverage the same code that is leveraged in componentWillMount without forcing both to plumb props throughout the component.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
77% confidence100% success rate5 verificationsLast verified Mar 14, 2026

Solution: componentDidReceiveProps Please

Low Risk

@syranide The trouble is when setup needs to call methods that also need props, which needs to call methods which also needs props... Eventually your entire component is plumbing around props.

77

Trust Score

5 verifications

100% success
  1. 1

    @syranide The trouble is when setup needs to call methods that also need props,

    @syranide The trouble is when setup needs to call methods that also need props, which needs to call methods which also needs props... Eventually your entire component is plumbing around props.

Validation

Resolved in facebook/react GitHub issue #3279. Community reactions: 8 upvotes.

Verification Summary

Worked: 5
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

reactjavascript