react-native-magic-sheet icon indicating copy to clipboard operation
react-native-magic-sheet copied to clipboard

Warning: Can't perform a React state update on an unmounted component.

Open cristea2017 opened this issue 1 year ago • 0 comments

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

cristea2017 avatar Jul 13 '23 12:07 cristea2017