robinvdvleuten / vuex-persistedstate

💾 Persist and rehydrate your Vuex state between page reloads.
https://npm.im/vuex-persistedstate
MIT License
5.77k stars 379 forks source link

Documentation needs examples and better explanations for implementation. #278

Closed uxinkc closed 4 years ago

uxinkc commented 4 years ago

Problem description:

I was able to implement SecureLS as stated in example, but there is no documentation on how to actually do anything with the storage methods. How do I call the three methods getItem, setItem, and removeItem? All of the examples that are show, don't actually show how the plugin methods can be triggered. I am looking for an example that shows how to call removeItem() so that when a User clicks logout, I can clear the data within SecureLS. How is that done?

Also, the API documentation uses terms like path as if the Reader should know what path means, and the definition uses the term path to define it. What exactly is a path? How is it used?

Same thing for reducer... what is a reducerand how does it affect the ill-defined path?

Suggested solution:

Update your documentation with real-world code examples that show how a Developer can add code to remove data from storage, so that the data no longer persists.

Thanks.

robinvdvleuten commented 4 years ago

@uxinkc would it be an idea that you create a PR with changes to the documentation where you see it lacks?

uxinkc commented 4 years ago

I would certainly help, but that would require me to understand how the code works, which requires the Documentation to to be updated. How am I supposed to help with documentation if I don't understand what part of the documentation needs to be updated?

What is lacking in the documentation is an example as to how to call the storage methods. I don't know how or where a global delete works, so how can I do a PR and tell you what is missing, when I don't know how the code works?

I have also spent the last few days looking on the web for examples on how to use this plugin to call removeItem(), but I haven't found anything.

robinvdvleuten commented 4 years ago

If this is still relevant, please open a new issue.