Skip to content

[release] 1.38.0 - queue events prior to initialization on Statsig

Choose a tag to compare

@dan-loomb dan-loomb released this 01 Apr 23:23

Due to the order of effects, the effect to initialize Statsig was not actually called until child components rendered. This means that if you did not waitForInitialization or waitForCache, it would be possible to call methods on the Statsig class before it was initialized. Our gate/config/experiment and even event logging hooks were okay, because they consume the StatsigContext and guard on initialization being called.

This updates logevent to:

  1. not throw
  2. batch up to 20 events pre initialize (and then log them once the internal js sdk instance is ready to consume them). Note that it currently drops any additional events after 20 queued events.

Included In This Release

  • 4d21882 tore-statsig
    • Merge pull request #21 from statsig-io/1-37-1-pub (#173)
  • e33ba1e tore-statsig
    • bugfix: queue log events before initialization (#171)
  • 8b7c1a0 tore-statsig
    • chore: bump depedency versions (#172)