Most websites built as SPAs using React are slower, buggier and more expensive to maintain than if they had been built using mostly server-side rendered pages, like we did in the 90s.
The problem there isn't with React, it's with people who build websites out of a tool that's designed for huge applications.
Most websites shouldn't be built with React. Most single-story buildings shouldn't be built out of steel I beams. That doesn't make them a bad material, it just means you shouldn't use them if a simpler material will do.
> Most single-story buildings shouldn't be built out of steel I beams.
But many are! This is the issue. 10-50x the effort, complexity, hours, expense. Lots and lots of steel, everywhere, because managers heard that Megacorp uses steel and now insist on it.
Hey actually React has nothing to do with Megacorp at all. We adopted React in 2015 on a small team (less than 10 engineers) as did many other small startups at that time. The decision to use React on a small team is the same as it would be on a large team: It dramatically changes frontend development. It makes this career worth while. I did 5 years before React, and now still using React 7 years after with no competitor in sight.
I don't use React because I'm being forced to. We chose React!
Depends on the problem that small team is solving. I've used SPAs on several "small" teams (Angular*, Backbone.js) and they are very effective for solving the kind of problems that are otherwise solved by native applications (winforms and the like). When you have hundreds or thousands of forms / screens in a system then SPAs provide a large reduction in complexity.
For websites: we all like to dump on PHP but it was literally designed to build websites with relatively limited features / large reach - which covers a large swathe of the web.
So SPA: good for ERPs, CRMs etc but bad for webshops, social networks, TODO apps, news sites, Streaming sites, blogs etc.
[Why Angular? React is technically interesting, especially that it's build around the Rx pattern popularized in dotnet, however I have a deep-seated hate for Facebook for their key part in making Brexit happen which trumps any technical merit. Vue wasn't a thing back then]
This 1000x. Every nail looks like a React app. Most frameworks are overkill for most sites/apps. There are definitely ones that need that level of architecture, but that isn't most of the time.
I think it's using the right tool for the job. I thoroughly regret not using Vue or other major JS framework 5-6 years ago when building out our new application. While the server-side is solid the client-side is sort of a mess. A mix of a ton of different things, underscore templates, jquery, etc. It's not an SPA but any modern web application requires a ton of javascript.
We are slowly incorporating Vue into some aspects of the application and the code is just so much cleaner and legible, with better performance in a lot of cases.
SPA loading performance can be improved by splitting React app into multiple SPAs each rendered by its own smaller bundle. Additionally, for many websites, the landing/index page of a SPA can be prerendered at the build time. The result is the best performance ever achievable for many (but not all) websites.
Once SPA has been loaded, it switches to SPA internal pages faster than "like we did in the 90s" because for static pages there is no network round trip and no delay called TTFB. For dynamic pages, making API call and fetching API data (to use it for CSR) likely takes less network bandwidth than fetching HTML generated on the server (as a part of SSR).
Also server rendering uses server CPU and it's never totally free. Especially if server side needs to be scalable.
Front-end features can "infinitely scale" without React. Career growth is great, but, in my experience, after a while (maybe ~Senior Engineer), it becomes technology-agnostic.
I imagine the career growth would have happened regardless of which framework became the new hotness. That is, any framework with similar usage/growth would have done the same. I've just seen the pattern too many times.
Maybe, it's hard to say. Whether or not it caused it significantly or how it was involved, the "react era" has coincided with a huge increase in demand, pay and respect for front-end specialists.
A whole webdev cohort came up on and with these technologies, were taken seriously because of their mastery of them, and have moved into areas of tech and engineering that would have been absolutely off-limits to "mere" html/css developers.
I'm not willing to claim that react alone made that happen, but it's not at all clear to me that it would have without react having the timing, momentum, and cachet that it has.
No, the career growth happened in 2015 when we adopted React and stopped endlessly inserting JS and CSS tags from jQuery plugins. Backbone made things worse. Angular made things worse. React objectively changed my life and allowed me to work several remote jobs at once. I watched half a dozen startups adopt React for the better. There is no similar growth or usage to React. React is the king.
Exactly. The first time I observed this it was some Perl/CGI framework who's name I've forgotten. Then ColdFusion, then COM, PHP (Cake, Zend) and on the front there was that hotness before jQuery (which I've forgot), jQuery, that other one for a spell and now React.
Loads of people board the train at the most recent stop and are amazed how "fast" it's going.
At least with surfing all the waves are different - in web-tech it feels like the same wave over and over.
> there was that hotness before jQuery (which I've forgot)
Prototype and Script.aculo.us? I remembered being in Prototype camp because I deemed jQuery to be too different (and in a hindsight, that was one of my worst decision in tech)
Bingo. Smart people understand the domain of interview questions (which we know is contrived) and typically can study enough to implement the solutions. It's not always about getting the question right- it's about demonstrating you are smart, but also these questions are core CS fundementals so it also tests that they have a formal education. Anyone can learn Git, JS, but how many can apply a programming language to a complex problem on the spot?
With Metal Hurlant [known in the US as Heavy Metal] also being popular in France at that time, plus the arrival of first role playing games (both US ones and french ones), it was a high time for us, the geeks.
Yes, functionality would require skills, and skills require opinionated tools. Opinions require taking a stance, and that's the last thing anyone here wants to do.
I was trying to be snarky, implying that it's easy to make a site with no tech when that site has no feature and no content. I am quite curious at what you're trying to say, because I caught the sarcasm but none of your meaning.
Your first sentence goes my way, but then... I don't know.
The prevailing view here is that JavaScript is a nightmare to develop with when in fact, there is actually a bit of a golden age going on right now. It's never been more stable and fun to build apps on the web. Maybe I'll write a post about it.
You didn't need TypeScript. That was your first mistake. If you had chosen Create-react-app (the official boilerplate) - that's all you need. Hello world right out of the box. Nothing blows up in your face. Nothing mind-boggling. I've never had to ever run eject. Nothing saddening, nothing tiring. In fact- just the opposite. Happiness, joy, energizing React productivity.
Creat-React-App has a TS option (and, IIRC, it's not that hard to use TS on a CRA app that wasn't created with that option, but it's been a while since I did that.)
Manually setting up React (with or without TS) isn't all that hard, either.
What framework did you end with? What state management approach? What styling strategy? I think the churn stops whenever you stop adopting new things to replace functionally equivalent things, but new things still come along and get hyped.
Library: React
State Management (if needed): Redux via Redux Tool Kit. Maybe Redux Toolkit Query too if necessary.
Style Strategy: SCSS or Styled Components (if I have to)
Framework: Remix[0]
This is honestly a very easy set of questions to answer today.
Software engineers that replace things with functionally equivalent things don't get a lot of actual work done and typically aren't employed for very long either. So, the churn had to stop long ago from inside the average high performing company (and professional engineer's mindset). Only when things are really bad (as they were 6 years ago) is it worth rewriting everything. We've done that and it's not happening again. You can follow my work here: react.school
So because there's no churn and everything is standardized I assume you can tell me which state management library is the correct choice for a React app without causing any controversy?
I'm saddened that we're comparing a degree in CS to a subscription to Codecademy.
I am curious if you've gotten a degree yourself, and whether that degree was from a reputable school. My CS degree is one of my proudest and most difficult accomplishments in my life.
The difference in someone with a 4 year CS degree and a bootcamp graduate is jarringly apparent and one that I have uncomfortable experience with.
My following statement will cause me to be downvoted, because the truth makes people uncomfortable. Computer Science education is a rite of passage, like getting a black belt, becoming a priest, doctor or anything else that requires intense study with peers for extended period of time.
The CS degree at a top school is more than a signal, its a badge of honor and respect. You may choose to ignore it to your own peril.
My first thought is that "writing code" is not the same as CS, of course.
Second, your comment about "a reputable school" is interesting and indeed, probably, part of the disagreement with some people. On one hand, I'm open to the idea that someone can get a rigorous computer science education at any school, regardless of the prestige or admissions rate or rankings. On the other hand, I work with a bunch of people who are in some stage of earning an undergraduate degree through various online programs, and I sometimes see them doing schoolwork when things are slow (e.g. on a night shift), and I'm shocked that it confers college credit. I'm talking about classes on basic algebra that I learned in the 8th or 9th grade. Someone with a master's degree from a similar program bragged about writing his entire "master's thesis" in one sitting while drinking and receiving a grade of 100%... Anyway, it bugs me that they might think of their degree(s) as equivalent to mine. It's also easy to imagine that they might end up having a low opinion of all college degrees afterward, not realizing how much more rigorous the experience can be at other schools.
Funny how people without aeronautics degrees built first rockets.
Degree is just a paper that certifies you.
There are many people i know that acquired more knowledge outside than their classes.
Don’t compare graduates with people fresh out of boot camp. There are people who never stop learning after boot camp, they build skills over time and can even surpass “degree” holders.
But like i said, if that paper certifies and allows you to become lawyer great, but that doesn’t mean a person who spent 4 years studying law is any different.
A badge of honor and respect is also known as a “signal.” Not that signaling is inherently bad, quite the opposite, signaling is essential. But it would be great if we could discover cheaper and more accessible ways to signal.
PS: I don’t think a CS degree is just signaling, but it could be improved an order of magnitude if the incentives of the professors and the institutions were aligned with teaching people marketable skills.
Yes I totally understand your point of view. I spent almost a decade paying off a six figure debt for my CS degree. The funniest part? I learned almost nothing about web development in school. No marketable skills that would have really helped me when I first started my actual job! How can I argue this is a good thing?
Well, the best analogy I can think of is a black belt in karate. It takes 10 years or whatever to get that. It has no marketable purpose. Why do it? The answer is more than "to get a job". It's about Discipline. Focus. Intense research into fundamentals. Stretching your limit if what you can learn in a weekend. Writing half a page of assembly code on a piece of paper. Debugging a C program. Red black trees. These have no purpose, but when reflecting on these experiences, I would not trade them for a second for "Intro to Javascript and HTML".
This surely can't be true for the typical image-based NFTs? I thought the entire point is that the full JPEG is embedded in the blockchain, thus not being dependent on any image hosting service.
On chain storage is expensive per KB so the vast majority of image-based NFTs are stored on awful image hosting services. A very common complaint among NFT buyers is how many of the "NFT-specific" image hosting services have already gone down and/or (of course) respond to things like DMCA takedowns.
Thanks for the explanation, this makes me profoundly sad and is completely absurd. They call it "minting" which I actually thought was a neat way of putting the image itself on chain which can't be deleted and is permanent, so people spending crazy amounts of money can at least have the piece of mind that what they've bought is immutable. This shouldn't be considered an NFT at all.. imagine if bitcoin was just linking to a bank transaction. In fact- a definition of NFTs: "unique digital asset that is not directly replaceable with another digital asset" - swapping the results of the URL would invalidate this. What is the actual point?
It's not as bad as you think. If the frontend and database is open source, the assets will be mirrored, and therefore end up in a giant archive. This is what happened to Hic Et Nunc last month - founder decided to pull the plug, community resumed within a few hours with other sites. The power is in the technology mix: Blockchains and smart contracts secure the transactions, everything else can be secured with existing methods. It's an incentive structure shift that's still being explored - you always want a 100% archival because it protects the represented value on-chain. It pushes the business model away from platform control as well. They will most likely have to differentiate with curation and discovery services.
Currently, a lot of the frontends are not open. They pose the same degree of rugpull risk as any ordinary web site. That is unlikely to remain the status quo since both collectors and artists will ultimately demand a proof of redundancy. But as it stands, it's a bubble, and the rules aren't set.
You can check out the contract for the Big Ape Yacht Club NFTs, for yourself[1]
If you go to Contract and then Read, there's a function you can execute towards the end which gets you the URI for a token. If you grab a token ID[2] and enter it in, you'll get back an IPFS address. Should be more permanent than a random image hosting site, but it's certainly not the same as storing the image on the blockchain.
Most are stored on traditional hosting services, some are stored on other chains (IPFS) and some are stored on the parent chain. Data storage costs vary a lot depending on the chain.
I wrote jQuery in production for 5 years and then switched to React for 6 years in production at a half dozen companies. In my opinion, nothing can be improved further. I love writing React, it solves every problem you can think of and scales for large codebases.
Prior to React, we were using Backbone, Handlebars and jQuery. It was horrible. Logic was put into Handlebars templates, Backbone models created an unnecessary abstraction, we had to setup our own event handlers for every model -> view change. It just didn't work. JSX solved all these problems.
Frontend-state management with React is not complicated. There is a current trend to trash React because of its perceived complexity. Take it from an experienced React developer- it's easy and fun. Hooks are a short syntactic sugar over its lifecycle methods. Once you learn hooks, there isn't much more to learn.
I'm not sure where you are in your career now, but I recommend that you give React another chance, and avoid jumping on the bandwagon to hate on React. It's solved so many problems for me and allowed me to actually enjoy my job as a software developer.
Literally what? React is responsible for infinitely scaling frontend features and career growth I never could have imagined.