Hacker News new | ask | show | jobs
by gcommer 2945 days ago
> Burn all of your markup down to the ground and replace what you had with <div id="app" />

This isn't totally true -- if you really only wanted to implement a single toggle and leave the rest of the page alone, then you could replace just the relevant DOM elements with a container and render into that fragment of the page. (Though really I'd ask why use React if that's the only value you're getting out of it)

> I guess that’s why I’m still struggling to comprehend why so many organizations are so eager to take the sturdy, foundational layer of the frontend stack and rewrite it all in a proprietary format. [...] Projects like Vue are showing that’s not necessary.

Except, Vue.js does require a proprietary format; all those v-* attributes and custom components will be need to be migrated if you want to switch away from Vue. Comparatively, React is better in this regard because there are multiple implementations of React (preact, inferno, nerv). Also, JSX is technically optional, and it's really easy to mix markdown, or other formats/templating engines into a React app to handle the content-heavy bits.

1 comments

I feel like the word "proprietary" means something different to me than the author. When I think of proprietary I think of a closed standard that may or may not be copyrighted/patented. Something like React would not even come close to my definition.

Wikipedia seems to agree with me [1], but maybe I'm misinterpreting it:

[1] https://en.wikipedia.org/wiki/Proprietary_software