Skip to content

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

@cristea2017

Description

@cristea2017

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

Simulator.Screen.Recording.-.iPhone.14.-.2023-07-13.at.15.18.05.mp4

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