Need an opinion on a component : too much code? Is the general architecture of the component ok? #9777
Unanswered
axel-paillaud
asked this question in
Help/Questions
Replies: 1 comment
-
No, I wrote 3k line code for a form post page, even though I have extract 2 component. I don't know how to optimization the code, because its logic is very complex. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here is the code of the component, I think what may cause the problem is the
updateDate
object (the stack is Laravel + Vue 3 with Inertia) :We end this component with a total of 233 lines of code. Do you think it's too much ?
Here is the render of this component, I can filter table based on datetime :
( Sorry, it's in french, it's a dropdown menu with 'year', 'month', 'day' filter).
It work well like this.
When I extract the
updateDate
object into a composable, I have a scope issue : becauseupdateDate
is called itself withupdateDate.month.increase()
, the variablemonth
does not increment.Also, if you have other opinions on this component, do not hesitate: I am a beginner Vue developer, and open to criticism.
Beta Was this translation helpful? Give feedback.
All reactions