th3g3ntl3man
th3g3ntl3man

Reputation: 2106

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"
      />
    );
  };
}

Upvotes: 4

Views: 6183

Answers (3)

Zolt&#225;n Bata
Zolt&#225;n Bata

Reputation: 81

The v12.3.0 is working for me with Expo SDK 48

Upvotes: 0

Kazeem Quadri
Kazeem Quadri

Reputation: 265

If you are using expo run this command

expo install react-native-svg

Upvotes: 0

Vlad Moisuc
Vlad Moisuc

Reputation: 256

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.

Upvotes: 15

Related Questions