Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(reactive): fix issue when using reactive array in the template #532

Merged
merged 7 commits into from
Oct 4, 2020

Conversation

pikax
Copy link
Member

@pikax pikax commented Sep 18, 2020

fix #524

Readded the recommendation of using ref([]) instead of reactive([]), because reactive([]) doesn't work well with computed atm

@pikax pikax requested a review from antfu September 18, 2020 07:12
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
b.list[0].count.value === 0 // true
```

</details>

<details>
<summary>
✅ <b>Should</b> always use <code>ref</code> in a <code>reactive</code> when working with <code>Array</code>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, do you mean "If you need to use ref in Array, wrap it with reactive"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a native English speaker, which statement makes more sense to you? We can improve other statements along the way.

src/mixin.ts Outdated Show resolved Hide resolved
src/mixin.ts Outdated Show resolved Hide resolved
expect(JSON.parse(vm.$el.textContent)).toStrictEqual([{ value: 1 }])
})

// TODO make this pass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Planned to support it in this PR or another?

@antfu antfu merged commit d99b91d into vuejs:master Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in composition-api beta 14
2 participants