ampproject / ampproject/samples
`componentWillReceiveProps` for react-amp-document will be removed in React 17
Open
- Dominant language
- HTML
- Stars
- 452
- Forks
- 187
- PR merge metrics
- No merged PRs in 30d
Description
Per https://reactjs.org/blog/2018/03/29/react-v-16-3.html
New lifecycle hook is `getDerivedStateFromProps` (which returns state change), or we can simply switch to `componentDidUpdate` (store url and only fetchDocument when prop url changes)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the react-amp-document component and locate its use of componentWillReceiveProps. Compare the two lifecycle alternatives described in the issue, then verify that document fetching still responds correctly when the prop URL changes and that the deprecated lifecycle is no longer used.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100