3 ms·
They've been there and done that http://blog.atom.io/2014/07/02/moving-atom-to-react.html http://blog.atom.io/2014/07/02/moving-atom-to-react.html http://blog
by hajile 9y ago
They've been there and done that
http://blog.atom.io/2014/07/02/moving-atom-to-react.html http://blog.atom.io/2014/07/02/moving-atom-to-react.html
http://blog.atom.io/2014/07/22/default-to-react-editor.html http://blog.atom.io/2014/07/22/default-to-react-editor.html
Turns out that for the important things in an editor, React has a hard time optimizing as much. I'm a huge proponent of React, but the right tool for the right job is an important principle for the pragmatic.
https://github.com/atom/atom/pull/5624 https://github.com/atom/atom/pull/5624
I think since then, they've circled around to a much more restrictive and faster virtual dom. React could be made quite a bit faster (as proven by Inferno) without changing the API and moving to a more monomorphic, but verbose API could probably offer a big performance boost.
I've wondered in the past if the best solution wouldn't actually be to render the editor part as a canvas element and remove the normal DOM from the picture completely. VS Code did something similar with their console a few versions ago.
https://code.visualstudio.com/blogs/2017/10/03/terminal-renderer https://code.visualstudio.com/blogs/2017/10/03/terminal-rend...
EDIT: Looks like they've given some thought to canvas already (for the next go around). With webassembly, they could even offload to a nice C++ or rust library running and repainting a canvas element in another thread.
http://blog.atom.io/2017/06/22/a-new-approach-to-text-rendering.html http://blog.atom.io/2017/06/22/a-new-approach-to-text-render...
- RobertRoberts 9y agoThis is the exact reason I've commented (and been shouted down for) saying that React is a fad. It's trying to replace fundamental core system with a layer, and do it better. It will never work, it can't. Eventually everyone will figure out that building "apps" with DOM manipulation will never be as performant as lower level coding (ie, not a script layer), and they will move on. And the DOM will return to light apps and general purpose websites with basic interactivity. How can it go any other way? Btw, the only reason I am posting this is bit out of frustration that stating something so obvious makes some people really angry. I suspect its because they have invested so much in React, and don't want to consider it a temporary hack until webassembly or shadow dom or some other tech makes it completely obsolete. I tried out Atom, it's miserably slow. And I recently downloaded VScode, just to give it a whirl, and it's impressively faster. But I use Komodo, and that is based on Scintilla and Firefox, and it works just fine.
- mattbierner 9y agoReact’s declarative Api is much easier to read and update than working with dom calls directly. And React itself doesn’t even have to target the dom, as with react native which generates native system UI