Announcing the new suite of Statsig Javascript SDKs
Blog post from Statsig
Statsig has introduced a new set of JavaScript SDKs that optimize package sizes by up to 60% and enhance features such as web analytics and session replay, streamlining initialization and unifying core functions into a single updateable source. The redesign addresses the challenges of maintaining and updating the previous SDKs, which had become bloated due to a variety of customer customization needs and the creation of separate packages for significant changes. The new @statsig/js-client SDK is more compact than its predecessors, retaining critical functionalities while providing a common interface and shared components for event logging and initialization across packages. This update also includes synchronous initialization options, eliminating the dependency on network requests for rendering applications, and supports an event-driven approach through the ClientEventEmitter for lifecycle event subscriptions. To ease the transition, migration guides are provided for current users, and sample applications have been integrated to ensure code consistency and facilitate the adoption of these SDKs across different frameworks, with ongoing support planned for Angular and Vue.