salsita / prism

React / Redux action composition made simple http://salsita.github.io/prism/
496 stars 24 forks source link

Cancel saga after component is unmounted #19

Closed lewtds closed 8 years ago

lewtds commented 8 years ago

I see sagas are only started when mounting components but not stopped when they are unmounted. This can introduce data corruption when navigating from component C1 to component C2 of the same type.

lewtds commented 8 years ago

Wow. You're so fast! I was about to submit a similar patch (https://github.com/lewtds-forks/redux-elm/commit/3058d96e12cf1fd0954e5eb5d3a7c5f6a9286726) but then I saw this. And your code is better anyway. Thanks so much!

Also, could you release a new version with this issue fixed?

tomkis commented 8 years ago

@lewtds sure, pushed and released 2.1.4