0
私は2つのストア、すなわちAttachmentStoreとCommentStoreを持っています。他のストアからストアを更新する方法
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