News for hackers. Stuff that matters.
Re:React 16 by mlsarecmg on Tuesday September 26, 2017 @04:19PM (#15342169)
immutable.js for what? Seems to me you're picking up hear-say here and there but why and for what would you want to use immutable. Even redux docs speak out against it. It's just a random tool like any other, you're assuming it has some deeper significance with react, it doesn't.

> be constantly aware of small quirks like keys when looping

There are no "quirks" in looping anything. It is plain javascript. I would call "v-for" a quirk on the other hand.

    const array = []
    for (let item of items)
        array.push(<li>{item.text}</li>)
    
    render (
        <ul>
            {array}
        </ul>
    )
Recreate the snippet above, then let's discuss.
Re:React 16 by mikewhy on Tuesday September 26, 2017 @05:18PM (#15342602)
Doesn't that produce the "array items should have key prop" message?

Also you can use `items.map` in your example.

Re:React 16 by mlsarecmg on Tuesday September 26, 2017 @05:28PM (#15342678)
I only wanted to show that react doesn't specify a programming style. He said javascript maps are "quirky." Maps are fine but so are plain loops. Ternaries are fine, so are plain if-then-else constructs if someone would like it better that way.

The example would run without keys, it's merely for demonstration. You'd need keys in Vue as well.