question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Touchable not allow use array of styles

See original GitHub issue

Hello, just test 1.1.0 in our project

import { TouchableOpacity } from 'react-native-gesture-handler'; 
...
 <TouchableOpacity
   onPress={onPress}
   style={[styles.touchable, style]}
 />

not work as expected (in RN Touchable work)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

2reactions
fouad1994commented, Mar 2, 2019

You have imported wrong class TouchableOpacity it is not a class from react-native-gesture-handler you have to use import { TapGestureHandler } from ‘react-native-gesture-handler’;

or

import { TouchableOpacity } from ‘react-native’;

1reaction
fouad1994commented, Mar 2, 2019

Ah ok Sorry I don’t know that please can you take a view for my issue may you can help me? https://github.com/kmagiera/react-native-gesture-handler/issues/485

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generate touchable oppacity with map using nested array
I write a calculator app and i need to generate touchable opacity using map I have a nested array state ...
Read more >
How to create and style custom buttons in React Native
Learn how to create custom UI components with React Native three ways — creating your own, using a CSS-in-JS library, and by adding...
Read more >
Style - React Native
With React Native, you style your application using JavaScript. ... You can also pass an array of styles - the last style in...
Read more >
React Native Tutorial #8 - Touchable Components - YouTube
Hey gang, in this React Native tutorial we'll see how to create touchable components, and wrap them around other components so that they...
Read more >
React Native Tutorial 11 - Touchable Components - YouTube
React Native allows developers to develop apps by using JavaScript but at a ... In general, you should use either FlatList or SectionList....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found