5 ms·
That looks to me, a lot more complicated than it needs to be. I think that has combined two separate things - atoms and cursors. Here they are in javascript: h
by dustingetz 11y ago
That looks to me, a lot more complicated than it needs to be. I think that has combined two separate things - atoms and cursors. Here they are in javascript:
https://github.com/cjohansen/js-atom/blob/master/atom.js https://github.com/cjohansen/js-atom/blob/master/atom.js
https://github.com/dustingetz/react-cursor/blob/master/src/Cursor.js https://github.com/dustingetz/react-cursor/blob/master/src/C...
Vastly less code than https://github.com/mweststrate/mobservable/tree/master/src https://github.com/mweststrate/mobservable/tree/master/src.
Cursor+Atom has nothing to do with Rx or core.async, of course, and is probably not the future. (I say this as the maintainer of react-cursor)
- curveship 11y agoIt looks like react-cursor is 1300 loc [1], mobservable is 1900 [2]. How is that "vastly less code"? 1 - https://github.com/dustingetz/react-cursor/blob/master/dist/react-cursor.js https://github.com/dustingetz/react-cursor/blob/master/dist/... 2 - https://github.com/mweststrate/mobservable/blob/master/dist/mobservable.js https://github.com/mweststrate/mobservable/blob/master/dist/...
- deleted 11y ago[deleted]
- dustingetz 11y agoThe essential idea of a cursor can be implemented in about 10 lines, and because I actually looked through the source code of mobservable, I understand what they are essentially doing and how it requires a couple hundred lines. Since we're talking ideas here and not implementations, measuring artifacts is not helpful.