r/javascript • • Aug 27 '15

Stop Using React for EVERYTHING!

https://medium.com/@zackargyle/stop-using-react-for-everything-c8297ac1a644
3 Upvotes

131 comments sorted by

View all comments

7

u/te7ris Aug 27 '15

give me one good reason NOT to use react for everything.

-1

u/geuis Aug 27 '15
  • search engine reachable content

  • content intended to be embedded in other sites

  • non-js browsers

That's 3.

4

u/te7ris Aug 27 '15

they are all invalid. You can achieve all 3 w/ react.

0

u/geuis Aug 27 '15

No, they aren't. React is complete overkill for lots of the uses people have been using it for.

Going back the last 5 years, we've had Backbone, Ember, Knockout, Cappucino, Marionette, Angular 1, Angular 2, React, Virtual Dom, and even more frameworks I'm not recalling right now. It has been a constant progression of one js framework to the next, all trying to solve the same problems in a variety of ways.

Meanwhile, actual work has been done just building sites based on the best practices of the last 20 years with tons of practical advancements being made with low level protocols and new browser capabilities.

Yes, I have used most of these frameworks. For a vary narrow set of application types, they are suitable. But they are not useful for the majority.

4

u/te7ris Aug 27 '15

define overkill. If you think size in kb, think again.

-2

u/MisterSticks Aug 27 '15

Just curious, where are you employed that is using React in production?

3

u/te7ris Aug 27 '15

the projects I work on for my employer (3 days a week) dont use react (they have their own stack). The rest of my time I spend on developing a pretty big react project which is not yet in production. Had 2 small React projects (SPAs for interal stuff) before that.

1

u/MisterSticks Aug 28 '15

React hasn't been in the wild for more than a year, do you have any personal projects that predate React?

2

u/te7ris Aug 28 '15

I first picked up react dec 14' and had tried various things with it. The most frustrating was trying to combine libs that havily change the DOM with the react-render-cycle. Why are you asking?

1

u/theQuandary Aug 28 '15

That's still a rather easy solution compared to quite a number of frameworks.

When your component mounts into the DOM, you then wire in whatever DOM-manipulating library you're using to the local DOM element(s). To prevent React from interfering, you use shouldComponentUpdate to trap and handle any data updates and return false (so no re-render). In the componentWillUnmount stage, you unwire whatever you're using.

Two and a half out of three of those are things you'd need to be doing anyway. The only major change is returning false to prevent re-rendering.

→ More replies (0)