3 ms·
I'd encourage you to write it once in vanilla and once in React in jsfiddle and compare the implementations. Then consider the render model and how it would af
by CharlieDigital 4y ago
I'd encourage you to write it once in vanilla and once in React in jsfiddle and compare the implementations.
Then consider the render model and how it would affect page time to interactive for a large content oriented page.
- christophilus 4y agoI’ve written this sort of thing in both. Personally, I find the “make your view a function of your state” approach to be much easier to reason about and more maintainable. Obviously, not if the only thing your site does is this one feature. But as soon as your site becomes non-trivial, I prefer the functional / React approach.
- hombre_fatal 4y agoWell, frameworks vs vanilla JS doesn’t cash out into whether it’s hard to write ‘element.style.display = “…”’ or not.