Skip to content

Memory Leak? #20

Open
Open
@mikecann

Description

@mikecann

Hey,

Im very new to Reason so was just looking through this codebase trying to learn real-world examples of how to do things and I came across this line:

https://github.com/reasonml-community/reason-react-hacker-news/blob/master/src/TopStoriesPage.re#L49

Im wondering if this is a memory leak because it doesnt get un-listened when the component unmounts?

It might explain this console error you get when running locally:

main.js:3176 Warning: Can't call setState (or forceUpdate) 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.
in TopStoriesPage (created by App)

Im submitting this is an issue rather than doing a PR because im very new so no doubt im missing something here. Ill happily attempt a PR if this is indeed an issue.

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