Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 974 Bytes

MIGRATION-GUIDE.md

File metadata and controls

40 lines (28 loc) · 974 Bytes

Migrating to Redux SDK v2.0.0

Redux SDK v2.0.0 introduces a breaking change that you should consider when migrating from a previous version.

If you were passing the core.trafficType option to the SDK configuration object, you should remove it since it is no longer supported. The trafficType must be passed as an argument of the track helper function. For example:

import { initSplitSdk, track } from '@splitsoftware/splitio-redux'

const CONFIG = {
  core: {
    authorizationKey: YOUR_CLIENT_SIDE_SDK_KEY,
    key: USER_KEY,
    trafficType: 'user'
  }
}

store.dispatch(initSplitSdk({ config: CONFIG }))

track({ eventType: 'my_event' });

should be refactored to:

import { initSplitSdk, track } from '@splitsoftware/splitio-redux'

const CONFIG = {
  core: {
    authorizationKey: YOUR_CLIENT_SIDE_SDK_KEY,
    key: USER_KEY
  }
}

store.dispatch(initSplitSdk({ config: CONFIG }))

track({ eventType: 'my_event', trafficType: 'user' });