React-native-gesture-handler: RectButton onPress does not work

Created on 23 Jul 2019  路  12Comments  路  Source: software-mansion/react-native-gesture-handler

Hi,

RectButton's onPress doesn't work. I'm using React Native 0.60.4 inside of a Styled Component:

export const Hour = styled(RectButton)`
  background: #fff;
  padding: 20px;
  flex: 1;
  opacity: ${props => (props.enabled ? 1 : 0.7)};
  align-items: center;
  margin: 0 10px 20px;
`

I've tried running jestify, a manual React Native link despite the recommendations, cleaning cache but nothing works. It decided not to work for NOTHING.

Most helpful comment

Screen Shot 2019-08-08 at 12 35 48 PM
Make sure you followed this insctructions

All 12 comments

The same issue I'm facing, were you able to fix this?

Screen Shot 2019-08-08 at 12 35 48 PM
Make sure you followed this insctructions

...
Make sure you followed this insctructions

Dont worked here :(

image
Resolved for me. In my case, I forgot to pass spreading props...

The same problem happens again...
Clean cache and run react-native run-android again fix the problem.

image
Resolved for me. In my case, I forgot to pass spreading props...
Diego`s code! Rocketseat...rs
I also copied them

Screen Shot 2019-08-08 at 12 35 48 PM
Make sure you followed this insctructions

I'm on react-native 0.60.5 and this worked flawlessly. cheers mate.
P.S next time dont use a picture :(

Screen Shot 2019-08-08 at 12 35 48 PM
Make sure you followed this insctructions

I'm on react-native 0.60.5 and this worked flawlessly. cheers mate.
P.S next time dont use a picture :(

Documentation and codes in this picture.
https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html#android

fortunately its working.

Screen Shot 2019-08-08 at 12 35 48 PM
Make sure you followed this insctructions

Thank you, its working now!!
That's what we got when do not read the docs rsrsrs

for me onPress trigger but ripple effect sometimes and most of the time not working. an strange behaviour

for me onPress trigger but ripple effect sometimes and most of the time not working. an strange behaviour

I have the exact same problem and I'm loosing my mind, did you ever found something ?

@adblanc, please don't comment on closed issues, those reports are easily missed. You can create a new issue with repro, we'll try to figure this out 馃槃

Was this page helpful?
0 / 5 - 0 ratings