0
Ich habe 2 Speicher nämlich AttachmentStore und CommentStore.So aktualisieren Sie einen Laden von anderen Speicherfunktion
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
}
}
Ich weiß, ich Anhänge als Teil CommentStor Observablen erklären kann, aber ist es eine Möglichkeit, Anhänge beobachtbaren von CommentStor aktualisieren kann?
Große Antwort. Ich habe die gleiche Antwort gefunden, indem ich den Laden an den Laden weitergeleitet habe, der ihn aktualisieren möchte. – rechie