Where would a component specific helper function go in a project folder structure? #9463
Unanswered
AnnaYuS
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The question is somewhat related to this discussion
In what folder would you put a ts file with one or two helper functions? The functions are used in only one component, but you've decided to extract them in a separate file so that you could test it easily.
It could go into a separate folder like
helpers
orutils
orlib
. What speaks against it is that the files that are usually found in these type of folders have reusable functions, but the function in question is specific to the component and is not going to be reused.Another option is to put it next to the vue component where it is used like so:
I haven't seen it done in other projects, but it might be a good idea? What do you think?
Beta Was this translation helpful? Give feedback.
All reactions