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

Why the @ for path access is needed?!?

Open pate313373 opened this issue 3 years ago • 2 comments

Hi!

I have previously used vuex-map-fields, which is even simpler than this library. With vuex-map-fields, I could access a nested prop of an object just by using ".", here I need the "@".

I don't see any benefit in this syntax. I'm just wondering, if it wouldn't be better to simplify the path syntax in a next major release....

Kind regards

PS: Really like your library! Otherwise, I would still use vuex-map-fields.

pate313373 avatar Nov 17 '21 20:11 pate313373

Hey!

Yes, I've thoughts similar.

At the time I think I decided it would be a good idea to be explicit.

Some developers will jump on "time saving" libraries, and at the time there was terrific disagreement about the "best way" or the "right way" to do Vuex / Flux.

I didn't want to risk the library being "rejected" so that was the decision I took.

By the way, have you tried using just a . ? I can't remember if I coded it to allow both or not...

davestewart avatar Nov 22 '21 14:11 davestewart

Cool, happy you have similar thoughts! I am not sure at all, but I think it's possible partially. So if I remember right, there are a few functions, which don't allow using "." only. - I'll keep you posted.

Thanks for the nice library, really like it so far. :)

pate313373 avatar Nov 22 '21 21:11 pate313373