I am using the example of the Readme file. But the initial state is loaded with zero experiments. I have thought to use the loadExperimentVariants function but I am not sure what is the way for the used it. I think with dispatch because return an action but the state is a parameter, why?
Without the initial state the library working perfectly. But I suppose this is used for keeping the state of the experiment between client browser tabs.
const initalState = {
experiments: digestCookies(Cookies.get())
}
export default createStore(
rootReducer,
/*initalState,*/
)
I am using the example of the Readme file. But the initial state is loaded with zero experiments. I have thought to use the
loadExperimentVariantsfunction but I am not sure what is the way for the used it. I think with dispatch because return an action but the state is a parameter, why?Without the initial state the library working perfectly. But I suppose this is used for keeping the state of the experiment between client browser tabs.