In my code, every thing is ok till I add the Menu element from gluestack, then I code the next error
Code with out bug
<SafeAreaView>
<StatusBar
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
backgroundColor={isDarkMode ? Colours.darker : Colours.lighter}
/>
<View type={commonStyles.pageContainer}>
<WarehouseDropdown
warehouseLoading={warehouseLoading}
setWarehouseId={setWarehouseId}
warehouseOptions={warehouseOptions}
warehouseId={warehouseId}
defaultWarehouseId={defaultWarehouse}
/>
<FlatList
contentContainerStyle={types.mainContainer}
knowledge={knowledge}
renderItem={({merchandise}) => <WaveRow merchandise={merchandise} />}
keyExtractor={merchandise => merchandise._id}
onEndReached={handleLoadMore}
onEndReachedThreshold={0.5}
ListFooterComponent={renderFooter}
/>
</View>
</SafeAreaView>
code with bug
<SafeAreaView>
<StatusBar
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
backgroundColor={isDarkMode ? Colours.darker : Colours.lighter}
/>
<View type={commonStyles.pageContainer}>
<Menu
placement="prime"
offset={5}
set off={({...triggerProps}) => {
return (
<Button {...triggerProps}>
<ButtonText>Menu</ButtonText>
</Button>
);
}}>
<MenuItem key="Neighborhood" textValue="Neighborhood">
<Icon as={GlobeIcon} measurement="sm" className="mr-2" />
<MenuItemLabel measurement="sm">Neighborhood</MenuItemLabel>
</MenuItem>
<MenuItem key="Settings" textValue="Settings">
<Icon as={SettingsIcon} measurement="sm" className="mr-2" />
<MenuItemLabel measurement="sm">Settings</MenuItemLabel>
</MenuItem>
</Menu>
<WarehouseDropdown
warehouseLoading={warehouseLoading}
setWarehouseId={setWarehouseId}
warehouseOptions={warehouseOptions}
warehouseId={warehouseId}
defaultWarehouseId={defaultWarehouse}
/>
<FlatList
contentContainerStyle={types.mainContainer}
knowledge={knowledge}
renderItem={({merchandise}) => <WaveRow merchandise={merchandise} />}
keyExtractor={merchandise => merchandise._id}
onEndReached={handleLoadMore}
onEndReachedThreshold={0.5}
ListFooterComponent={renderFooter}
/>
</View>
</SafeAreaView>
error:
console.js:614 Warning: TypeError: _reactNative.BackHandler.removeEventListener isn't a operate (it's undefined)
This error is situated at:
in Overlay (created by Popover)
in Popover
in Unknown (created by Menu)
in _c8 (created by WaveListScreen)
in RCTView (created by View)
in View (created by CssInterop.View)
in CssInterop.View (created by WaveListScreen)
in RCTSafeAreaView (created by CssInterop.unknown)
in CssInterop.unknown (created by WaveListScreen)
in WaveListScreen (created by SceneView)
in StaticContainer
in EnsureSingleNavigator (created by SceneView)
in SceneView (created by NativeStackNavigator)
in RNSScreenContentWrapper (created by ScreenContentWrapper)
in ScreenContentWrapper (created by DebugContainer)
in DebugContainer
in RNSScreen (created by Animated(Nameless))
in Animated(Nameless)
I am not even utilizing BackHandler anyplace, tried to re-install node modules a number of time
I attempted reinstalling node modules.
I attempted asking Claude and ChatGPT, they are saying possibly my gluestack is not up to date however nothing useful.