Skip to content

Computed inside reactive #11729

Discussion options

You must be logged in to vote

It is ok but why not :

const counter = reactive({
  count: 0,
  doubled: computed(() => counter.count * 2),
  increment: () => counter.count++,
})

Less any less bug 😄

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by erwinheldy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants