Skip to content
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

CommentEditor: Use computed property instead of static data #197

Open
igeligel opened this issue Sep 3, 2019 · 1 comment
Open

CommentEditor: Use computed property instead of static data #197

igeligel opened this issue Sep 3, 2019 · 1 comment

Comments

@igeligel
Copy link
Collaborator

igeligel commented Sep 3, 2019

In the CommentEditor.vue component, we are using some bad Vue.js practice by not using a computed property. Instead, it will use a data property.

data() {
  return {
    comment: this.content || null
    // ...
  };
}

comment should rather be a computed property and used there. Be careful with changing it, because the data is also used as v-model in the textarea.

Resources

@ikrydev
Copy link
Contributor

ikrydev commented Oct 1, 2019

assign me to this one... @igeligel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants