-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
React deprecates componentWillReceiveProps in favor of getDerivedStateFromProps. Documentation. If we don’t fix this, the component will be broken in React 17.
react-image-fallback/src/index.js
Lines 39 to 47 in 6adce1a
| componentWillReceiveProps(nextProps) { | |
| if (nextProps.src !== this.props.src) { | |
| this.isLoaded = false; | |
| if (nextProps.initialImage) { | |
| this.handleInitialTimeout(); | |
| } | |
| this.setDisplayImage({ image: nextProps.src, fallbacks: nextProps.fallbackImage }); | |
| } | |
| } |
gshilin, favll, aelohin, cahergil, amilcarj and 4 more
Metadata
Metadata
Assignees
Labels
No labels