neciu / react-mixpanel

Unofficial React bindings for Mixpanel
73 stars 19 forks source link

Add Support For Server Side Rendering #21

Open TigerC10 opened 6 years ago

TigerC10 commented 6 years ago

Typically you don't want to track mixpanel events in a server-side render, but you also don't want your server-side render to fail because there is no mixpanel-browser provided.

To support server-side rendering, this package should provide a mock mixpanel provider with a bunch of no-op functions and empty variables.