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

Author here, this was written as a way for me to explore the core idea of react in a minimal setting. Things it's missing

- jsx

- routing

- performance (maybe?)

- component state management stuff

What else would you include?




Exclude JSX and routing. You'll need some state. Routing != rendering and JSX is an abomination.

For optimal performance, look into differential dataflow: https://github.com/TimelyDataflow/differential-dataflow/issu...


This looks interesting! Not a working replacement for React, right? I would probably add that for optimal performance, don’t use functional differential rendering at all. Keep state and use direct DOM manipulation of only elements that change, right? The very idea of re-rendering by throwing a whole new page up and letting the system diff and update is guaranteed not to be optimal performance, it’s always doing more work than necessary. The tradeoff is that the optimally performant solutions are imperative and stateful and involve all the difficult and bug-prone techniques everyone’s trying to avoid. Engineering for functionality is a solved problem. Engineering for performance is not.


Consider adding something like this for jsx (200 lines): https://github.com/wisercoder/uibuilder

Router (500 lines): https://github.com/Rajeev-K/mvc-router


(This was originally a reply to https://news.ycombinator.com/item?id=22777156)


Agreed, except for routing which is not a part of React per se.


Look at Pureact (I’m the author) and make a pull request with your diff code to make the whole thing without any dependencies? Would be supercool!




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

Search: