Skip to content

Commit

Permalink
Merge pull request #19399 from emberjs/wagenet-patch-1
Browse files Browse the repository at this point in the history
Update ArrayProxy Documentation
  • Loading branch information
Chris Garrett authored Feb 12, 2021
2 parents 389e0de + d70010d commit 6c7f7aa
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/@ember/-internals/runtime/lib/system/array_proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,16 @@ function customTagForArrayProxy(proxy, key) {
}

/**
An ArrayProxy wraps any other object that implements `Array` and/or
`MutableArray,` forwarding all requests. This makes it very useful for
a number of binding use cases or other cases where being able to swap
out the underlying array is useful.
An ArrayProxy wraps any other object that is a native or Ember `Array`
(checked with [`Ember.isArray`](/ember/release/functions/@ember%2Farray/isArray)),
forwarding all requests. This makes it very useful for a number of
binding use cases or other cases where being able to swap out the
underlying array is useful.
NOTE: Attempting to mutate the underlying content of an object that
is not a `MutableArray` (e.g. a native Javascript Array) may not
behave as expected. [`Ember.A`](/ember/release/functions/@ember%2Farray/A)
may be used in this case.
A simple example of usage:
Expand Down

0 comments on commit 6c7f7aa

Please sign in to comment.