Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/rules/no-setup-props-destructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This rule reports the destructuring of `props` passed to `setup` causing the val
export default {
/* ✓ GOOD */
setup(props) {
watch(() => {
watch(() => props.count, () => {
console.log(props.count)
})

Expand All @@ -45,8 +45,8 @@ Destructuring the `props` passed to `setup` will cause the value to lose reactiv
export default {
/* ✗ BAD */
setup({ count }) {
watch(() => {
console.log(count) // not going to detect changes
watch(() => count, () => { // not going to detect changes
console.log(count)
})

return () => {
Expand All @@ -70,7 +70,7 @@ export default {
/* ✗ BAD */
const { count } = props

watch(() => {
watch(() => props.count, () => {
/* ✓ GOOD */
const { count } = props
console.log(count)
Expand Down