Open
Description
Hi!
I see that List
's property length is proxied to become size
which is the right one for Immutable.
Here's a piece of code:
const {List} = require('immutable-proxy')
const list = List([1, 2, 3])
console.log('List size: ', list.length) // 3
console.log('Filtered list size: ', list.filter(() => true).length) // undefined
You see, since all "modifying" methods return a new object, ImmutableJS creates a new one internally, which is, obviously, isn't proxied!
This bugs totally destroys a potential use of this package, unfortunately. It's just a tip of the scale, the problem exists in any collection methods which return a new object!
Metadata
Metadata
Assignees
Labels
No labels