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

I must've done something wrong, but I haven't attained that "zen" part when I tried to use React. On the contrary, it felt like I'm writing a giant pile of boilerplate code "just to use React", where there shouldn't be any.

A simple, almost ToDo-like form quickly grew to 7 files, averaging 100 SLOC each, with a air-filled boilerplate-feeling classes (yet not lacking works-by-convention magic) that juggle data through those render -> onClick={e => this.onItemAdd(e)} -> onItemAdd -> addItem -> update -> UpdatePromise -> handleUpdateItems -> render loops.

Sure, everything's logical but that feels like I'm deeply stuck in the wheel of Samsara, writing code for its own sake and not attaining any Enlightenment. ;)




> render -> onClick={e => this.onItemAdd(e)} -> onItemAdd -> addItem -> update -> UpdatePromise -> handleUpdateItems -> render loops

you seem to have fallen prey to overengineered examples.

that example should be

>> render -> onClick={e => this.onItemAdd(e)}

thats it, data change should re render the tree.


Well, maybe. But I also wanted it to sync up with the server too (onItemAdd actually updated component's own state with extra "save in progress" flag, handleUpdateItems would clear it later).


well then you are doing much more than

  A simple, almost ToDo-like
You can do things like writing sever-syced component,mixin ect .


Me either. I understand the benefits but for side projects and stuff it's just not a very fun language to learn or use. Even Angular, with it's weird paradigms, seems more natural.




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

Search: