RectButton onPress does not work
See original GitHub issueHi,
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.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:19 (1 by maintainers)
Top Results From Across the Web
Gesture Handler discontinued? RectButton dont workig (but its ...
I tried using ReactButton, but the onPress function doesn't run on click. All posts found on google are about not writing an arrow...
Read more >Buttons | React Native Gesture Handler - Software Mansion
This library allows to use native components with native feedback in adequate situations. If you do not wish to implement custom design approach,...
Read more >RectButton onPress not work under Modal - Bountysource
RectButton onPress not work under react-native component Modal , but TouchableOpacity works. some dependency:
Read more >How to use RectButton in react-native-gesture-handler - Tabnine
RectButton (Showing top 4 results out of 315) ... justifyContent: 'center', }}> <RectButton onPress={() => { console.warn('press (this wont be printed)');.
Read more >Button - React Native
A basic button component that should render nicely on any platform. Supports a minimal level of customization. If this button doesn't look ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
UPDATE 2022-08-17
Documentation changed and the installation is now more easier the ever. Take a look at the docs:
https://docs.swmansion.com/react-native-gesture-handler/docs/next/installation/#js
Resume:
install the lib
yarn add react-native-gesture-handler
After installation, wrap your entry point with
<GestureHandlerRootView>
orgestureHandlerRootHOC
export default function App() { return <GestureHandlerRootView style={{ flex: 1 }}>{/* content */}</GestureHandlerRootView>; }