nikhilaravi / react-native-smart-scroll-view

A smart scroll view component with handling of keyboard events
MIT License
153 stars 31 forks source link

Children are always passed as an array #31

Open RobinClowers opened 7 years ago

RobinClowers commented 7 years ago

If you nest a TouchableWithoutFeedback inside a SmartScrollView, it will throw an invariant error: React.Children.only expected to receive a single React element child. It appears that it expects a single React element to be passed as children, but SmartScrollView is passing it an array.

This jsx snippet should reproduce the issue:

<SmartScrollView>
  <TouchableWithoutFeedback>
    <Text>test</Text>
  </TouchableWithoutFeedback>
</SmartScrollView>