captbaritone / raven-for-redux

A Raven middleware for Redux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warn if createRavenMiddleware is called more than once

captbaritone opened this issue · comments

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.