vuex-pathify icon indicating copy to clipboard operation
vuex-pathify copied to clipboard

Add an example of code without pathify vs with pathify

Open hitautodestruct opened this issue 4 years ago • 6 comments

Coming in from heavy use of vuex in an app I'm working on it took me a while to understand why I needed pathify.

I found it very hard to understand how pathify reduces my code until I found this post comparing regular vuex methods to pathify.

I would suggest you add at least one such example on the pathify 101 page or a similar introductory page.

hitautodestruct avatar Jul 18 '19 11:07 hitautodestruct

That's a good suggestion.

I've really struggled with keeping the docs to a minimum on this lib, but I think that could be helpful.

There are examples dotted throughout the docs, but you're looking for just a single place, perhaps:

  • intro / vuex comparison

?

davestewart avatar Jul 22 '19 11:07 davestewart

Yes, although it could just be one direct comparison on the pathify 101 page.

I found some direct comparisons of pathify vs vuex methods on the components helpers page.

Basically I was looking for the equivalent vuex code, because thats what I know and where I come from. Once, I saw the comparison it was clear what pathify does.

hitautodestruct avatar Jul 23 '19 06:07 hitautodestruct

Shouldn't this be closed ? I already see examples of vuex equivalent code in docs.

WhiteBookmark avatar Aug 14 '19 21:08 WhiteBookmark

@WhiteBookmark Yes, if you dig deep you will see examples. I am trying to make the point that initially it is very unclear as to what pathify gives you when readin g the intro and 101.

hitautodestruct avatar Aug 15 '19 05:08 hitautodestruct

I'm happy to add another section with some basic examples.

It's really hard to get the level of detail right in the docs. I always aim to keep them lean, but always end up writing much more than I would like to have, hence it becomes harder to find things.

In an ideal world, I'd make the docs leaner, but I doubt that will happen, so this is a good compromise.

davestewart avatar Aug 15 '19 09:08 davestewart

Keeping the docs simple and short is admirable. However as a new user exploring, it is verying important that the first thing they read in the readme on GitHub or on NPM includes enough to make them think it will be useful and worthwhile for them. I am all for adding a simple "pathify lets you go from ... to ... and that is why you should try it. Seeing the actual code change it huge.

For me seeing what <script setup> does in Vue 3 made me an instant convert. I hate having to sift through a bunch of code details to extract the meaning, especially when there is a simple way that makes the intent more obvious.

julie777 avatar Sep 28 '21 16:09 julie777