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

> 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 .




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

Search: