DEV Community

Discussion on: Stop Using React

Collapse
 
aleksandrhovhannisyan profile image
Aleksandr Hovhannisyan

This is what a stream is. I hope that clarifies things for you.

No... no it doesn't. This has nothing to do with what React is or is not.

React is built with JavaScript and just wraps native DOM operations. It's a layer of abstraction on top of existing APIs.

You said:

Ditch React and become friends with the web. It's a web, interconnected, with resources coming from everywhere.

Are you aware that there are "resources coming from everywhere" in React apps too? Have you ever examined the output of a React app with your dev tools? Or inspected your network tab? Anything that React does can be done with the native DOM, but with much greater complexity.

As for your point in regards to #5: This is the slippery slope fallacy you are engaging in.

It's not a slippery slope to suggest that we do exactly what you proposed: to stop using a product belonging to a company that has been sued (Facebook). So, I ask: Why are you selectively boycotting React but not any other products created by other companies that have been sued?

Ironically, you are engaging in argument from fallacy.

Thread Thread
 
ender_minyard profile image
ender minyard • Edited
No... no it doesn't. This has nothing to do with what React is or is not.
What does it even mean? Stream? What?

You were confused by what a stream is, so I shared some helpful links.

React is just a wrapper API around the native DOM. So is the native DOM fighting against the natural flow of the internet, too? Or JavaScript?

React downloads all resources for a SPA at once. React needs to download resources for seconds at a time, blocking the main thread. Read the article again, perhaps?

Thread Thread
 
matthewpardini profile image
Matthew Pardini

Dude... react doesn’t do that. And the internet is NOT a readable stream. In fact, 99% of all resources are loaded NOT as streams which come off the response.body(), which you must attach a stream reader to in order to read the stream.

This is painful. Client side rendered apps will hit the browser, and turn around and go back to a server for the javascript bundle. That is true, unless you do ssr, in which case the react app hits the browser with the first view already built as html.

AFTER the first screen is built, the react code then turns around and makes more calls to “lazy load” the rest. In older react, it was handled in componentDidMount. Today it’s done in useEffect(). These run AFTER the first render.

It’s obvious you don’t know a lick about react

Some comments have been hidden by the post's author - find out more