react-native-magic-sheet
react-native-magic-sheet copied to clipboard
Warning: Can't perform a React state update on an unmounted component.
Hi, first of all thx for such great modal manager ))
after installing & config I get this err
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
in BottomSheetBackdropComponent (at MagicSheetPortal.tsx:60)
Here is example how I used it:
const History = () => {
useEffect(() => {
magicSheet.show(
() => (
<View>
<Text>asdasd</Text>
</View>
),
{backgroundStyle: {backgroundColor: theme.black60}},
);
}, []);
return (
<Screen bg={theme.black95}>
<HistoryList />
<BackBtnUI />
</Screen>
);
};
export default History;
PS: here is a video example
https://github.com/RodSarhan/react-native-magic-sheet/assets/28201006/55cbd160-dd41-4d17-9a69-925d48c003c0