Closed khanharis87 closed 3 years ago
@khanharis87 It's because the active variant is saved on local storage (see calculateActiveVariant
and store
).
It is done on purpose, ideally a user should always get the same variant and this is best thing that we can do client-side.
If you delete PUSHTELL-${experimentName}
from local storage and refresh the page, react-ab-test
will pick another variant (see https://developers.google.com/web/tools/chrome-devtools/storage/localstorage).
Thanks for the reply, It makes sense, but before( last week) it was showing different variants on refresh. So that is why I am confused
@khanharis87 it might be because you used a different browser, cleared the browsing data or, in case of local development used a different address or port number, (e.g. localhost:1234
vs localhost:5678
or 127.0.0.1
vs localhost
).
Table of Contents
Expected Behavior
show 50, 50 of 2 variants as assigned in defineVariants
Current Behavior
Only one variant being shown
Possible Solution
My console cries about using old react lifecycle methods.
Steps to Reproduce (for bugs)
Use one the examples and it does the same, after refreshing few times, it still shows same variant
Your Environment