Skip to content

Dose't work with pressable #34

Description

@Coolister-Ye

Below is a minimal repo, it seems this project cannot work with Pressable. When I click in Pressable, console.log didn't print anything.

import { Pressable, TouchableWithoutFeedback, View, Text } from "react-native";
import { EventRegister } from "react-native-event-listeners";

export default function EventProvider({ children }) {

    return (
        <TouchableWithoutFeedback className="flex-1" onPress={(e) => { 
            console.log(e.target);
            EventRegister.emit('pressOutside', e); 
        }}>
            <Pressable>
                 <Text>Click Here</Text>
            </Pressable>
            <View className="flex-1">
                {children}
            </View>
        </TouchableWithoutFeedback>
    )
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions