Skip to content

In a React Sharepoint Framework webpart, the ComponentWillUnmount is not invoked when the webpart is deleted from the Page. #1570

@yoghcl

Description

@yoghcl

I'm facing issue with the React web part I have in my solution. The ComponentWillUnmount event is not invoked when I delete the web part from the page.

To repro this issue, I have created a dummy webpart, which writes some stuff to the console log when it is unmounted (I am assuming here that whenever we remove a SPFX React web part, it should call ComponentWillUnmount handler). In my case, it is not logging the stuff to the console window.

You can refer the code here https://github.com/yoghcl/reactUnMount

Please let me know if I am missing something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:spfxCategory: SharePoint Framework (not extensions related)status:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:bug-confirmedConfirmed bug, not working as designed / expected.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions