-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Work in progress] Separation of concerns using Vue #121
Conversation
Can probably be refined even more, but this is what there is for now
This relates to #72 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this'd work fine, I think. I'm not too big a fan of the need for so many custom build tooling and Vue-specific attributes, but it's a big enough framework I think that that shouldn't be too much of a problem.
Do we have an idea of what the upgrade story to v3 is going to be like? One thing we should look out for is not only changes that break our code, but changes that break some of the tooling (bundles, editors, etc,), and that tooling not being able to keep up.
Speaking of which: how was WebStorm's support? I recall that VSCode has the vetur plugin which is supposedly pretty good, so it's interesting to see what that story is like for other editors. E.g. did you get syntax highlighting for Vue attributes in templates? Type completion?
} | ||
|
||
save (): void { | ||
this.$emit('save', this.raw) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume this is throwing an event, but I haven't found yet where it is caught - can we/TypeScript trace that?
(I've seen projects where it was unclear whether an event could be removed, because there was no good way to tell whether there were still listeners that were expecting it - or vice versa, that it was not clear whether a listener could be removed. Debugging was also hampered because stack traces ended at the event.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is caught by the v-on:save="toggle"
that you'll find in Markdown/App.vue
.
This is how event handling are done in Vue. I think it's fairly easy to follow the trace, as it's always direct connection between parent-child, not grandparent-child (not 100% sure on this though).
We've decided to use React for this purpose going forward. |
Trying out new conventions with Vue.
Using TypeScript and Templates, supporting Sass for styling.