Skip to content
This repository was archived by the owner on May 15, 2020. It is now read-only.
This repository was archived by the owner on May 15, 2020. It is now read-only.

Question regarding children constraint #1

@sospedra

Description

@sospedra

We all know that TouchableNativeFeedback only support one single child. But, why don't handle it and wrap the children into a View?

render () {
  // changing some pieces of your render

  // notice the `toArray`
  children = React.Children.toArray(children);

  // notice the View wrapping the children
  return <TouchableComponent>
    <View>{children}</View>
  </TouchableComponent>
}

Just wondering why don't do this approach :)

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