These are chat archives for SmartFocus/reactjs

18th
Feb 2015
James Cleveland
@radiosilence
Feb 18 2015 13:30
fucks sakes, ImmutableJS is being fucking weird
n = Immutable.Map({'hi': 'ho'}); console.log(n.keys(), n.keys().map)
n.keys().map is undefined?!?!
Matt Bilbow
@mattbilbow
Feb 18 2015 13:57
what does just n.keys() log?
Juho Vepsäläinen
@bebraw
Feb 18 2015 13:57
[Iterator]
it's probably not doing what you expect it to do. i guess you want to map over keys of an object?
Object.keys({'hi': 'ho'}).map would work but of course that's not immutable.js :)
Firtina Ozbalikci
@toxicFork
Feb 18 2015 15:12
@radiosilence :
yeah, because the iterator should use .next() apparently
no documentation, only saw a mention in a release log
All Sequences also support iteration via the @@iterator and Symbol.iterator methods, so they can be used in ES6 for-of comprehensions.
Firtina Ozbalikci
@toxicFork
Feb 18 2015 15:27
@radiosilence so far it looks like you'll probably need to write your own iterator mapper :( i haven't done a complete research though
Firtina Ozbalikci
@toxicFork
Feb 18 2015 15:35
@radiosilence someone in #babel/babel has an answer for the es6 iterator mapping problem
James Cleveland
@radiosilence
Feb 18 2015 17:04
@toxicFork could you poke RA and get him to skype JH and I
Firtina Ozbalikci
@toxicFork
Feb 18 2015 17:33
hi, sorry was away from gitter, do you wanna speak to him now?