Skip to content

Cookbook/Client-side Storage example description doesn't correspond to the example #1793

Closed
@maxirozay

Description

@maxirozay

At the end of the base example it says:

You could also store a date representing when the values were stored. With that metadata, the mounted method could make a logical call on whether or not to store the values again, such as in this version below. You can try this version below.

But in the example the mounted method only do:

if(localStorage.name) this.name = localStorage.name;
if(localStorage.age) this.age = localStorage.age;

The mounted method only check if the values exist, it never "make a logical call on whether or not to store the values again".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions