-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't play nicely with Redux? #137
Comments
Ah ok, what also works is simply using the method version of
Will do this for now! |
Hey @markgibaud -- please check out the latest release, v7.2.0 if you're still having issues. @bgergen PR may help fix this. |
Hey @tizmagik Hi, first of all awesome work! Most of our need are covered (hierarchical definition of metrics context, handle async event -- with promise result, handle visible event, handle basic click, handle event args, ...) and the babel decorator syntax in order to wrap and inject context is so nice! We have couple of place were it make sense for us to track event at the (Redux) reducer level, I'm guess this won't play well with React context, any suggestions? Happy to move this in new ticket, but related to Redux, so.. |
Hmm I'm not sure what you mean, why wouldn't it play well with React context? Under the hood, react-tracking does use React context to keep track of tracking objects. If you can, yes, a new ticket/issue would be helpful to dig more into your specific question about using react-tracking from within a Redux reducer. Thanks! |
Hi - hopefully this is something small that i'm missing.
This is how I've initially integrated react-tracking into a ReactNative app also using redux:
App.tsx:
MyComponent.tsx (rendered within App.tsx via react-navigation screens)
The problem is that when I run it something gets screwed with the HoC tree and I get this redux error:
If I remove redux from the picture the tracking via the decorators works correctly.
Curiously, if I convert over to using redux's connect as a decorator, it also works (both redux and tracking work fine).
However converting 100's of components over to using the redux decorator approach is not desirable for our codebase right now. Would prefer to get the redux connect HoC working with react-tracking's decorators.
Any guesses as to what's going on and where I can look into?
The text was updated successfully, but these errors were encountered: