Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while updating property 'fill' of a view managed by: RNSVGReact

I try to render a qrcode using this library: react-native-qrcode-svg but I have this error:

Error while updating property 'fill' of a view managed by: RNSVGReact

I install the required package react-native-svg but the problem persist. I'm using the latest version of all packages.

This is the full code:

import React, { Component } from 'react';
import QRCode from 'react-native-qrcode-svg';

export default class MyQRCode extends Component {
  render() {
    return (
      <QRCode
        value="http://awesome.link.qr"
      />
    );
  };
}
like image 967
th3g3ntl3man Avatar asked Mar 03 '23 21:03

th3g3ntl3man


1 Answers

As of 17 February 2020, installing the version 9.13.3 of react-native-svg is going to solve your problem.

Apparently, using expo install CLI is going to install the latest version of this package, but that's going to give you an error when you're starting the project(you'll see there specified what version of the package is supported by expo).

Just do something like:

yarn add [email protected]

or

npm install [email protected]

And you should be good to go.

See this link for more info.

like image 76
Vlad Moisuc Avatar answered Mar 05 '23 15:03

Vlad Moisuc