Skip to content
This repository was archived by the owner on Feb 19, 2022. It is now read-only.
This repository was archived by the owner on Feb 19, 2022. It is now read-only.

Touchable child must either be native or forward setNativeProps to a native component at invariant #7

Description

@L-Jovi

hi, my react-native version 0.37.0, and I use below object which provide to Stylesheet

styles

banner: {
  position: 'absolute',
  left: 0,
  right: 0,
  portrait: {
    top: 64 + 7,
  },
  landscape: {
    top: 0,
  },
}

js code

import React, { Component, } from 'react';
import {
  StyleSheet,
  View,
  Text,
  Image,
  TouchableOpacity,
  TouchableHighlight,
  TouchableWithoutFeedback,
} from 'react-native-responsive-styles';

class Banner extends Component {
  static styles = StyleSheet.create(styles);

  render() {
    const { styles, } = Banner;

    return () {
      <View style={styles.banner}>
        <TouchableWithoutFeedback
          onPress={actsMixed.platform.toggleDropDown}>
          <Animated.View style={[ styles.backDrop, { opacity: this.state.backdropOpacity, }, ]} />
        </TouchableWithoutFeedback>

        {/* some other components */}
      </View>
    }
    
  }
}

but I encounter the error as title say, how could I fix it?

image

thanks for your time.

regards.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions