Skip to content

CommentEditor: Use computed property instead of static data #197

@igeligel

Description

@igeligel

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions