4 ms·
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 (mayb
by leontrolski 7y ago
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?
- ngrilly 7y agoAgreed, except for routing which is not a part of React per se.
- pgt 7y agoExclude 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/issues https://github.com/TimelyDataflow/differential-dataflow/issu...
- dahart 7y agoThis 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.
- petilon 7y agoConsider adding something like this for jsx (200 lines): https://github.com/wisercoder/uibuilder https://github.com/wisercoder/uibuilder Router (500 lines): https://github.com/Rajeev-K/mvc-router https://github.com/Rajeev-K/mvc-router
- dang 7y ago(This was originally a reply to https://news.ycombinator.com/item?id=22777156 https://news.ycombinator.com/item?id=22777156)
- urvader 7y agoLook 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!