Skip to content

Question: TouchableOpacity onPress doesn't work #24442

Closed
@AlexMachin1997

Description

Hi,

I'm experiencing a weird issue with the TouchableOpacity component. When I press the component nothing happens, it should hide the modal but nothing. What makes this more difficult to debug is that I can't debug remotely as the metro bundler just stops working.

This is an incredibly annoying bug, would somebody be able to help me, please.

       <View style={{ flex: 1 }}>
           <View style={{ position: "absolute", right: 0 }}>
             <TouchableOpacity
               onPress={() =>
                 this.setState({
                   error: "",
                   item: {},
                   isAllergicModalVisible: false
                 })
               }
             >
               <MaterialCommunityIcons name="close-circle-outline" size={60} />
             </TouchableOpacity>
           </View>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions