File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -203,5 +203,4 @@ Update local custom node modules packages
203203## TODO
204204
205205- Unit tests
206- - Use React Hooks rather than class components.
207206- Integrate [Semantic Release](https://semantic-release.gitbook.io/semantic-release/) to automate the releasing process.
Original file line number Diff line number Diff line change 11{
22 "name" : " react-splitio" ,
3- "version" : " 0.1.7 " ,
3+ "version" : " 0.1.8-beta.1 " ,
44 "author" : {
55 "name" : " Samuel Castro" ,
66 "email" : " samuelcastrosilva@gmail.com" ,
Original file line number Diff line number Diff line change @@ -70,13 +70,22 @@ const SplitProvider = ({
7070 setUpdated ( { isReady : false , lastUpdate : 0 } ) ;
7171 }
7272
73- /** @link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#2-instantiate-the-sdk-and-create-a-new-split-client */
74- const nextClient = SplitFactory ( {
73+ const sdkConfig : SplitIO . IBrowserSettings = {
7574 ...config ,
75+
76+ /** @link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#2-instantiate-the-sdk-and-create-a-new-split-client */
7677 impressionListener : {
7778 logImpression : handleImpression ,
7879 } ,
79- } ) . client ( ) ;
80+ } ;
81+
82+ /**
83+ * Instantiating a new factory
84+ * @link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK
85+ */
86+ const factory : SplitIO . ISDK = SplitFactory ( sdkConfig ) ;
87+ const nextClient = factory . client ( config . core . key , config . core . trafficType ) ;
88+
8089 setClient ( nextClient ) ;
8190
8291 // Only make state changes if component is mounted.
You can’t perform that action at this time.
0 commit comments