Hacker News new | past | comments | ask | show | jobs | submit login

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.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: