0
2 개의 상점, 즉 AttachmentStore 및 CommentStore가 있습니다.다른 상점에서 상점을 갱신하는 f}
export class AttachmentStore {
@observable attachments = []
}
export class CommentStore {
@observable comments = []
save_comment_and_attachment(comment, attachments) {
this.comments.push(comment);
//how can I push the attachment to the
//attachments observable
}
}
은 내가 CommentStore의 관찰 가능한의 일부로 첨부 파일을 선언 할 수 있습니다 알고 있지만, 내가 CommentStore에서 관찰 할 수있는 첨부 파일을 업데이트 할 수있는 방법은 무엇입니까?
위 답변입니다. 나는 그것을 업데이트하고자하는 상점에 상점을 전달함으로써 동일한 대답을 발견했다. – rechie