Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

More than once I got asked on interviews why react is faster than vanilla JS and I had to tell them no, it isn't.


The clue would be in the fact that react is running in vanilla JS.

There is a persistent ‘learned helplessness’ tendency among some developers to assume that the frameworks they are using have access to magical mystical powers above and beyond those that their own code can make use of.

Framework code might well be better optimized or more tuned than the code you would write - but if you cared to employ similar techniques you could achieve those same gains; on the other hand, since by definition it’s more flexible than single-purpose code, it might not be optimal for your usecase.


You're technically correct (the best kind of correct), but it might be worth in an answer also exploring the possibility that they mean "Why is changing DOM a lot slower than changing VDOM a lot?"




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

Search: