Closed bradobro closed 9 years ago
@bradobro sorry for the silence... yes it appears React has removed all ability to reference internal react properties on component classes. For now, any component that is directly passed a the dispatcher
as a prop
will be able to find it, so a valid workaround is to pass the dispatcher
down through your render tree. Of course, this will become tedious quickly.
I'm going to attempt a better solution soon, just moving my projects over to 0.13.3
now. Since the dispatcher
is a singleton, delorean should be able to register it internally, which would allow the mixin to properly wire things up. Stay tuned, and thanks for reporting the issue.
Thanks, Darcy!
just published v0.9.4
to npm. This version fixes this issue. You no longer need to pass the dispatcher
as a prop to any react component.
Thank!
__findDispatcher()
relies on the React view having an attribute,_owner
, to help children find the dispatcher without having to pass it all the way down. My React 13.2 views don't have this attribute. Is it a figment of legacy React? Or is there some trick I'm missing?The mixin still works provided the dispatcher is passed down on the props of all views needing it, so there is a workaround.
Here's the code:
Using React 13.2 (13.3 is out but not well described in its changelog)