News for hackers. Stuff that matters.
Re:How to deploy a React app for free by sushshshsh on Tuesday August 18, 2020 @02:28AM (#24195838)
Really questioning this. The things available in vanilla js, html5 and css3 are immensely powerful and extremely well documented for those who care to dig into it
Re:How to deploy a React app for free by koonsolo on Tuesday August 18, 2020 @02:58AM (#24195953)
You are correct that those have a pretty good interface.

But here is some advice from an old programmer: once you start making bigger and more complex projects, you will start to make your own convenience libraries. And soon you will realize that you've built your own React-like library. But only less stable and less well thought out, because react has the huge community and maturity.

But if you only do some small functionality, or something specific with the technology, vanilla is perfectly fine.

However, if you are a single page app coder, I would definitely go for something like React.

Re:How to deploy a React app for free by rimliu on Tuesday August 18, 2020 @05:16AM (#24196672)
Not everything has to be built with React, and the size of it is orthoganal to the technology.

If fact, huge projects are likely to suffer from using React, because virtual DOMs get out of hand and a lot of resources a wasted by building and rebuilding VDOM and looking for the changes.

Also, for some reason, React brings a lot of cargo-culting. Many don't stop to thing whether they should even if they can. They bring React, then they bring Redux, then all the rest is being dragged in and you get multi MB bundles for some truly trivial purposes. Of course, that's more on developers than on React, but it happens way to often. And for some reason just bringing React and Co. is not enough, it usually ends up in some imressive architecture astronautics. At the end you have a project that is big, but slow and still impossible to understand because the levels of indirection are off the charts.

Re:How to deploy a React app for free by varrock on Tuesday August 18, 2020 @07:22AM (#24197391)
I'm not going to say you're wrong, because I don't have claim to back mine up, either. So, this is for the sake of discussion.

The sentiment that everybody reaches for Redux is tired, in my opinion. After following many in the web development community and keeping up with online forums such as this, it's fairly clear to me that people have moved on from the heavy armor previously associated with React if they have a choice. For instance, people learned that they were using Redux for prop drilling, which led to many switching over to the context API natively from React. Another good example is Gatsby, for those who realized they have a static site and would like to address the SEO issues associated with a SPA.

Also, a lot of times, companies adopted React and Redux before the inception of these new, more powerful libraries that are obvious choices on the ground as of August 2020. But, have fun refactoring your entire client side state seamlessly if you're tracking state more sophisticated than the status of the application sidebar.

Re:How to deploy a React app for free by koonsolo on Tuesday August 18, 2020 @12:22PM (#24200622)
So what do you suggest how huge projects should display data on a single page web app? MVC? MVVM? Just hack things in like the olden days, without any structure?
Re:How to deploy a React app for free by noahtallen on Tuesday August 18, 2020 @02:42AM (#24195886)
Since those are even more popular than React (given that React builds on top of that foundation), the point about using a popular tool for good ecosystem and documentation still holds for me.
Re:How to deploy a React app for free by hombre_fatal on Tuesday August 18, 2020 @04:04AM (#24196287)
Which part of their post do you think you're questioning?
Re:How to deploy a React app for free by sushshshsh on Tuesday August 18, 2020 @05:35AM (#24196787)
I'm questioning, at least for my purposes, the following:

1) That React is a powerful, productive, ergonomic language

2) That high quality resources exist for using it

I have struggled with both of these in React, yet in vanilla JS and html canvas I have no problem writing a 3d graphics engine lol

Re:How to deploy a React app for free by bryanrasmussen on Tuesday August 18, 2020 @07:09AM (#24197315)
I would think writing a 3d graphics engine is not really the use case for React.
Re:How to deploy a React app for free by sushshshsh on Tuesday August 18, 2020 @07:27AM (#24197428)
I'm remarking more on the complexity of the functionality in question when compared to the learning curve of the api that i use to implement it
Re:How to deploy a React app for free by bryanrasmussen on Tuesday August 18, 2020 @11:24AM (#24199778)
fair enough - I thought you were saying that you tried to implement a 3d graphics api in React and without React and the React one was much more difficult and I felt: that was as to be expected.