Skip to content

Implement cleanup strategy for closePortal in useFlatfile hook #83

@coderabbitai

Description

@coderabbitai

There's a TODO comment in the hook within suggesting the need for a cleanup strategy, specifically for removing the iFrame/listener from the DOM. This is important to prevent potential memory leaks or unintended behavior.

Context: The TODO was highlighted during a review of PR #82, specifically in the discussion #82 (comment).

The issue involves deciding on and implementing a strategy to ensure that resources are properly cleaned up when the function is called. This may include removing iFrames and detaching event listeners that were added during the portal's operation.

This task is crucial for maintaining the integrity and performance of the application, preventing memory leaks, and ensuring that event listeners do not persist beyond their intended lifecycle.

Requested by: @bangarang

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions