No component found for view with name "RNSVGGroup" React-native 0.45.1 #166
Description
CLOSED: Please ignore, as I neglected to see that this is an issue with react-native-svg, not with paths-charts.
Before filing an issue please ensure the following boxes are checked, if applicable:
- [x ] I have searched for existing issues
- I have provided detailed instructions that can reproduce the issue (including code and data necessary)
I've searched and have found similar issues that have been closed in the recent past, but I cannot figure out why I'm getting this issue.
When attempting to render the SVG by calling the class, the error gets thrown. Dismissing the error in my iOS simulator will show the SVG viewing area (a box with a red border) but not the filled Rectangle.
Code to follow:
package.json
{ "name": "geEnglishApp", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest" }, "dependencies": { "react": "16.0.0-alpha.12", "react-native": "0.45.1" }, "devDependencies": { "babel-jest": "20.0.3", "babel-preset-react-native": "2.0.0", "jest": "20.0.4", "react-test-renderer": "16.0.0-alpha.12" }, "jest": { "preset": "react-native" } }
sample code with SVG put in for testing purposes. index.ios.js
`/**
- Sample React Native App
- https://github.com/facebook/react-native
- @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import Svg,{
Circle,
Ellipse,
G,
LinearGradient,
RadialGradient,
Line,
Path,
Polygon,
Polyline,
Rect,
Symbol,
Use,
Defs,
Stop
} from 'react-native-svg';
export default class geEnglishApp extends Component {
render() {
return (
Welcome to React Native!
To get started, edit index.ios.js
Press Cmd+R to reload,{'\n'}
Cmd+D or shake for dev menu
);
}
}
class SvgExample extends Component {
render() {
return (
<Svg
width="200"
height="60"
<Rect
x="25"
y="5"
width="150"
height="50"
fill="rgb(0,0,255)"
strokeWidth="3"
stroke="rgb(0,0,0)"
/>
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
AppRegistry.registerComponent('geEnglishApp', () => geEnglishApp);
`