Skip to content

Instantly share code, notes, and snippets.

@jbutko
Created September 11, 2018 06:16
Show Gist options
  • Save jbutko/849341015857833a8d0878ceac65820b to your computer and use it in GitHub Desktop.
Save jbutko/849341015857833a8d0878ceac65820b to your computer and use it in GitHub Desktop.
MobX: Replacing item in observable array
const oldQuestion = this.questionsList.find(q => q.id === newQuestionId);
extendObservable(oldQuestion, newQuestionObject);
// via From https://stackoverflow.com/questions/39543194/mobx-replacing-item-in-observable-array/39546605
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment