Added isReadyFromCache status property to Split's piece of state, which is set to true if the SDK_READY_FROM_CACHE event is emitted (only applies for browser when using LOCALSTORAGE as storage type).
Added onReadyFromCache param in initSplitSdk action creator, to let the user attack a listener for SDK_READY_FROM_CACHE event.
getTreatments will immediately evaluate treatments if the SDK is operational, i.e., if either isReady or isReadyFromCache are true. If not operational, getTreatments keeps the same logic of adding control treatments to the store, without calling the SDK (no impressions).
Redux SDK
What did you accomplish?
isReadyFromCache
status property to Split's piece of state, which is set totrue
if theSDK_READY_FROM_CACHE
event is emitted (only applies for browser when using LOCALSTORAGE as storage type).onReadyFromCache
param ininitSplitSdk
action creator, to let the user attack a listener for SDK_READY_FROM_CACHE event.getTreatments
will immediately evaluate treatments if the SDK is operational, i.e., if eitherisReady
orisReadyFromCache
are true. If not operational,getTreatments
keeps the same logic of adding control treatments to the store, without calling the SDK (no impressions).How do we test the changes introduced in this PR?
Extra Notes