How to use mixpanel outside of React Components
Closed this issue · 2 comments
rubencodes commented
This isn't an issue so much as a question; if I want to use mixpanel outside of a React Component (say, in a redux action), would I simply do import mixpanel from 'mixpanel-browser'
and use it as normal?
rubencodes commented
Actually answered my own question. It seems like this is the case!
dphrag commented
I've had problems doing this though, if you're doing the server-side render, mixpanel-browser looks for a document, which won't be defined and you're in trouble.