meliorence / meliorence/react-native-image-gallery

Warning: Can't call setState (or forceUpdate) on an unmounted component

Open
#96 1 comment 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
717
Forks
298
PR merge metrics
No merged PRs in 30d

Description

Getting this warning on RN 0.55.3 while paging through an image list a tad fast.

The warning goes further with:
... 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
in ViewTransformer (at index.js:178)
in TransformableImage (created by CellRenderer)
in RCTView (at View.js:60)
in View (at VirtualizedList.js:1664)
in CellRenderer (at VirtualizedList.js:670)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at index.js:178 in ViewTransformer and reproduce the warning by paging quickly through the image list on React Native 0.55.3. Trace the component lifecycle around TransformableImage and determine what remains active after unmounting. Done means the warning no longer appears during rapid paging.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.