diff --git a/README.md b/README.md index 83421c93..bb389fef 100644 --- a/README.md +++ b/README.md @@ -160,26 +160,27 @@ b.list[0].count.value === 0 // true
-❌ Should always use ref in a reactive when working with Array +✅ Should always use ref in a reactive when working with Array ```js const a = reactive({ - count: ref(0), -}) -const b = reactive({ - list: [a], + list: [ + reactive({ + count: ref(0), + }) + ], }) // unwrapped -b.list[0].count === 0 // true +a.list[0].count === 0 // true -b.list.push( +a.list.push( reactive({ count: ref(1), }) ) // unwrapped -b.list[1].count === 1 // true +a.list[1].count === 1 // true ```