Skip to content

Warn if createRavenMiddleware is called more than once #51

@captbaritone

Description

@captbaritone

Currently this is the source of a potential memory leak (see #50), since Raven will continue to hold a reference our original dataCallback which has the store implicitly bound into it.

Additionally, we hard code where in the context we put the state, (data.extra.state), so the second call will cause any context provided by the first call to be overwritten.

I can foresee a possible use case where a user might have n different Redux stores on a given page, and might want to record context about all of them so let's have the warning include a link to our documentation where we can explain these things and give people a chance to request support for multiple calls.

I'll wrap the link in an http://bit.ly URL shortener so that we can track how many people are hitting the warning and clicking through.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions