Skip to content

The initial state not working with cookies #2

@eugenio1590

Description

@eugenio1590

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,*/
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions