Skip to content

The computed specified array subscript in react will not update automatically #3150

Answered by urugator
StringKe asked this question in Q&A
Discussion options

You must be logged in to vote

Dunno what the intention is, but computed shouldn't mutate observables (arr.splice(1)). Maybe you just wanna do the following?

get activeItem() {
  return this.list[this.listIndex];
}

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@StringKe
Comment options

@urugator
Comment options

@StringKe
Comment options

@urugator
Comment options

@StringKe
Comment options

Answer selected by StringKe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants