We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
with
import React, { AppRegistry, Component, Image, StyleSheet, View, ListView, Navigator } from 'react-native'; import Svg,{ Circle, Ellipse, G, LinearGradient, RadialGradient, Line, Path, Polygon, Polyline, Rect, Symbol, Text, Use, Defs, Stop } from 'react-native-art-svg'; var styles = StyleSheet.create({ container: { flex: 1 } }); export default class MyApp extends Component { render() { // Just imagine we're getting loggedInUserID from some other part of the app. return( <View style={styles.container}> <Svg height="100" width="100" > <Circle cx="50" cy="50" r="45" stroke="blue" strokeWidth="2.5" fill="green" /> <Rect x="15" y="15" width="70" height="70" stroke="red" strokeWidth="2" fill="yellow" /> </Svg> </View>); } }
I get cannot read property children of undefined Svg.js @66:0
The text was updated successfully, but these errors were encountered:
It doesn't like the arrow function in Svg.js :
if I replace
getChildren = ()=> { return Children.map(this.props.children, child => { return cloneElement(child, { svgId: this.id }); }); };
with:
getChildren = function(){ return Children.map(this.props.children, child => { return cloneElement(child, { svgId: this.id }); }); };
it works!
Sorry, something went wrong.
I made a PR #15
No branches or pull requests
with
I get cannot read property children of undefined Svg.js @66:0
The text was updated successfully, but these errors were encountered: