-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from splitio/polishing
Add `MIGRATION-GUIDE.md` file
- Loading branch information
Showing
8 changed files
with
69 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
# 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: | ||
|
||
```js | ||
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: | ||
|
||
```js | ||
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' }); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters