f / delorean

An Agnostic, Complete Flux Architecture Framework
749 stars 40 forks source link

Fix find dispatcher issue with react 0.13.x #85

Closed darcyadams closed 9 years ago

darcyadams commented 9 years ago

fixes issue https://github.com/deloreanjs/delorean/issues/83

This creates an internal reference to the dispatcher instance in order to allow it to be found by the react mixin.

Upside: a dispatcher prop no longer needs to be passed to any component and this approach is backwards compatible with earlier version of react. Downside: this approach is a little clunky, imo.

I have left the __findDispatcher method in place, which should make it easier to adopt new methods of attaching the dispatcher to views in the future, should we want to go that route.

darcyadams commented 9 years ago

since there no one really to +1 this, I'm just going to merge