Skip to content

Antd Affix: Memory leak error #22683

Closed
@mendoncanorma

Description

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. Scroll a little till the Affix becomes sticky.
  2. Click on Toggle button.
  3. First Affix is removed and second Affix gets mounted.
  4. Warning seen on console - 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 the componentWillUnmount method.
  5. Note: This is particularly observed in Chrome - Emulation Mode (Responsive Viewport Mode)

What is expected?

Warning should not appear

What is actually happening?

Memory leak warning is seen

Environment Info
antd 3.26.13
React 16.3
System Windows 10
Browser Chrome - Emulation Mode (Responsive Viewport Mode)

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions