Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceError: Cant't find variable: child #200

Open
Dev4ster opened this issue Apr 4, 2020 · 2 comments
Open

ReferenceError: Cant't find variable: child #200

Dev4ster opened this issue Apr 4, 2020 · 2 comments

Comments

@Dev4ster
Copy link

Dev4ster commented Apr 4, 2020

hello guys, I have this problem in external and internal images can someone tell me why? note: I installed all libs and settings.

image

import React from 'react';
import {View, Text, Button} from 'react-native';
import PropTypes from 'prop-types';
import SvgUri from 'react-native-svg-uri';
import loginFigure from '../../Assets/Image/loginFigure.svg';
import {title} from '../../Styles/Typography';

export default function SignIn({login}) {
  return (
    <View style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}>
      <SvgUri
        width="200"
        height="200"
        source={{
          uri:
            'http://thenewcode.com/assets/images/thumbnails/homer-simpson.svg',
        }}
      />
      <Text style={title}> SignIn </Text>
      <Button title="Login" onPress={() => login()} />
    </View>
  );
}

SignIn.propTypes = {
  login: PropTypes.func.isRequired,
};
  • react-native: "0.62.0"
  • react-native-svg: "^12.0.3"
  • react-native-svg-uri": "^1.2.3"
@tom-nuyts
Copy link

@Dev4ster I've got the same error, did you manage to make it work?

@jauggy
Copy link

jauggy commented Sep 24, 2020

I also have the same error.

I recommend using this library instead:
https://github.com/react-native-community/react-native-svg

import * as React from 'react';
import { SvgUri } from 'react-native-svg';

export default () => (
  <SvgUri
    width="100%"
    height="100%"
    uri="http://thenewcode.com/assets/images/thumbnails/homer-simpson.svg"
  />
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants