vault-development / react-native-svg-uri

Render SVG images in React Native from an URL or static file
850 stars 334 forks source link

fix: Solved version crash by replacing componentWillReceiveProps method #160

Closed fcpineiro closed 1 year ago

fcpineiro commented 5 years ago

Due to the new React versions tagging this method as UNSAFE, code will simply not work due to unhandled component exceptions.

This PR solves this by splitting the old componentWillReceiveProps between getDerivedStateFromProps & componentWillUpdate lifecycle hooks.

Feel free to comment or add any other change that would be worth it regarding version upgrade.