fixt / react-native-page-swiper

91 stars 47 forks source link

child.props.style is undefined #3

Closed micksabox closed 8 years ago

micksabox commented 8 years ago

Whenever I try to use this, I receive an "undefined is not an object (evaluating 'child.props.style') exception.

It looks like during the merging of the child's styles, for some reason these styles don't exist.

My render function and stylesheet is as follows:

render(){

        return (

        <Swiper style={styles.wrapper}>
            <View style={styles.container}>
                <Text style={styles.text}>Michael Nolivos</Text>
            </View>;

            <View style={styles.container}>
                <Text style={styles.text}>Text # 2</Text>
            </View>;

            <View style={styles.container}>
                <Text style={styles.text}>Something cool</Text>
            </View>;

        </Swiper> );

    }

const styles = StyleSheet.create({

    wrapper:{
    },
    container: {
        paddingTop:20, //This is for the status bar
        backgroundColor: '#F5FCFF'
    },
    welcome: {
        fontSize: 20,
        textAlign: 'center',
        margin: 10,
    },
    text: {
        textAlign: 'center',
        color: '#333333',
        marginBottom: 5
    },
});
micksabox commented 8 years ago

Oops! I had semicolons after my 's. Duhh. Closing this issue.