react-native-draggable-flatlist icon indicating copy to clipboard operation
react-native-draggable-flatlist copied to clipboard

Getting error : Requring Module .... invariant violation : new nativeEventEmitter()

Open ADLsourceCode opened this issue 2 years ago • 3 comments

Getting the below error After using "react-native-draggable-flatlist": "^2.6.2" with "react-native": "0.65.1". @computerjazz

Below is the code

  <View style={{ flex: 1 }}>
      <DraggableFlatList
      data={filterList}
      onDragEnd={({ data }) => {
        console.log(data);
      }}
      keyExtractor={(item) => item.id.toString()}
      renderItem={renderItem}
    />
    </View>



  const renderItem = ({ item, drag, isActive }: RenderItemParams<Service>) => {
    return (
      
        <TouchableOpacity
          onLongPress={drag}
          disabled={isActive}
          style={[
            { backgroundColor: "red" },
          ]}
        >
          <ServiceItem
            handleDelete={() => onDelete(item)}
            data={item}
            onPress={() => {
              setSelectedService(item);
              setOpen(true);
            }}
          />
        </TouchableOpacity>
      
    );
  };

simulator_screenshot_A2EC286F-DF82-4A01-B3B7-6952C27695D4

ADLsourceCode avatar Jun 16 '22 14:06 ADLsourceCode

haven't seen that error before, but can you try upgrading to v3?

computerjazz avatar Jun 17 '22 22:06 computerjazz

@computerjazz Similar error with V3 . any specific version you want me to do ?

ADLsourceCode avatar Jun 17 '22 22:06 ADLsourceCode

Getting same error with "react-native": "~0.63.4", and "react-native-draggable-flatlist": "^3.1.2"

ucheNkadiCode avatar Sep 19 '22 02:09 ucheNkadiCode

Getting same error with react-native 0.70.4, and the library ^3.1.2

bradjin8 avatar Nov 04 '22 16:11 bradjin8

Getting same error with react-native 0.70.4, and the library ^3.1.2

After struggling with this issue for a day. I found I skipped to do the configuration for the dependencies, reanimated and gesture-handler

Especially, this issue was resolved after wrapping the app component by GestureHandlerRootView as the installation guide here.

export default function App() { return <GestureHandlerRootView style={{ flex: 1 }}>{/* content */}</GestureHandlerRootView>; }

bradjin8 avatar Nov 04 '22 18:11 bradjin8