Open boxman0617 opened 6 years ago
I typically build my analytics into middleware. When a redux action is fired the middleware does a quick check on the type, and potentially fires off some Amplitude event.
What you're suggesting could be easily done and might be a better solution for projects without redux.
I've been marinating on this suggestion for a while and I think I haven't grasped the full extent of what this would look like. Can you give more examples? Or, talk me through what you're thinking?
@boxman0617 Ryan from Amplitude here. I'm really excited that people in the React community are innovating in this space! We just open-sourced our take on a react-amplitude
library with a React-ey API and would love feedback: https://github.com/amplitude/react-amplitude
@rorygarand Would love to hear your thoughts as well. Perhaps we could combine efforts?
As of now this library acts as a wrapper for Amplitude with some error handling, would love for this to have more of a declarative approach that would allow users to declare events through an element and props: