cssivision / react-native-qrcode

a minimalist qrcode component for react-native
MIT License
853 stars 303 forks source link

onLoad function not working #62

Open tranduchieu opened 6 years ago

tranduchieu commented 6 years ago

onLoad function not working

<QRCode value={id} size={200} onLoad={this.QRCodeOnLoad} />

Version: react-native: 0.56.0

ezailWang commented 6 years ago

same issue

6gunner commented 5 years ago

+1

deepyu commented 5 years ago

+1

jhihruei commented 5 years ago

onLoad and onLoadEnd cannot be triggered on iOS Ref: https://github.com/facebook/react-native/issues/18802#issuecomment-401764616

Add baseUrl: '', in Canvas.js can work for me:

source={{
  html:
    "<style>*{margin:0;padding:0;}canvas{transform:translateZ(0);}</style><canvas></canvas><script>var canvas = document.querySelector('canvas');(" +
    renderString +
    ').call(' +
    contextString +
    ', canvas);</script>',
  baseUrl: '', // Add this line
}}

BTW, this repo is no longer maintain 😢