statsig-io / react-sdk

An SDK for using Statsig Feature Management and Experimentation platform in React js clients
ISC License
6 stars 6 forks source link

1 38 0 pub #22

Closed tore-statsig closed 6 months ago

tore-statsig commented 6 months ago

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)

Included In This Release

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