News for hackers. Stuff that matters.
Re:React 16 by mlsarecmg on Tuesday September 26, 2017 @04:13PM (#15342113)
> I've been doing web development for decades and I don't have a clue what those lines of code are doing.

I don't think that's reacts fault? http://exploringjs.com/es6/index.html#toc_ch_first-steps

Other than the es6 syntax, would you like to specify what it is that you don't understand? If you look at it, it must occur to you that react components are functions that can receive properties and return markup. Now you can compose these functions. Just like in Vue or any other framework there is a single mounting point. If you understand this, you know the largest part of the react library.

Re:React 16 by irrational on Tuesday September 26, 2017 @05:14PM (#15342576)
I'm not the one who said that a beginner could blink at it and understand how to build React apps.
Re:React 16 by mlsarecmg on Tuesday September 26, 2017 @05:19PM (#15342616)
I never said you know react by looking at it. But you know it good enough to build a simple composition. If i asked you to create another component up there that contains a span, are you seriously saying you wouldn't be able to do it after having looked at it?

    const Foo = () => <span>hey</span>
or, same thing in es5

    function Foo() {
        return <span>hey</span>
    }
?

And if i asked you to use this component in another, even if you saw how it's done, you would absolutely not be able to pull it off again?

    function Bar() {
        return <Foo />
    }
?

To be honest, i thought i didn't like react as well when i first encountered it. I didn't actually try to understand, the appearance of it seemed so radically different that i refused to think of it as simple. But i eventually tried and figured that there is actually nothing behind this framework. These are plain functions, or classes with lifecycles. I was wrong in my assumptions.