kfiroo / react-native-cached-image

CachedImage component for react-native
MIT License
938 stars 470 forks source link

RN 0.60 support #168

Open uc-asa opened 4 years ago

uc-asa commented 4 years ago

Please add support for RN version 0.60. They deprecated NetInfo from react-native.

It was showing an error.

bogeresiraje commented 4 years ago

yeah. But one can currently first install "@react-native-community/react-native-netinfo", then browse >[your-project]>node_modules>react-native-cached-image>CachedImage.js.

  1. Delete { NetInfo } that is destructured from ReactNative
  2. Then import NetInfo from "@react-native-community/react-native-netinfo".

It worked for me

ThomasFindlay commented 4 years ago

@bogeresiraje it did work, but no one obviously should be modifying node_modules like that as everything will be lost on new install. This would require running a script after every install to replace this line.

ElvisChiang commented 4 years ago

@ThomasFindlay use patch-package to do the dirty thing

changweining commented 4 years ago

Bro,Change to another repo。