Skip to content

Split localStorage and sessionStorage #16

@ivan-kleshnin

Description

@ivan-kleshnin

Wouldn't it be better to split two targets onto two different drivers?

  1. I don't think that amount of if checks (we have now in the code) is better than possible code duplication.
  2. sessionStorage and localStorage have different level of support among browsers.
    So library can work with one and not work with another. Changing driver factory implies this more than
    changing key.
  3. "Controlling argument" is kinda of bad programming style.
  4. CycleJS driver is about side effect type. LocalStorage and SessionStorage are two different targets. They may have considerably different implementation, performance characteristics, etc.
    Two drivers better describe what goes on in reality.

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