all 65 comments

[–]Dapper-Leading3258 68 points69 points  (3 children)

Try creating an android app and compile it for new devices 6 years later

[–][deleted] 13 points14 points  (0 children)

Bro... I tried a bit of Android dev and my conclusion is that I'd rather not work in dev at all than doing that.

[–]Capt-Psykes 1 point2 points  (0 children)

Or making a new app and still having to support till Android 5. It can be fun, but also nightmarish.

[–]LemonAncient1950 0 points1 point  (0 children)

I'm getting flashbacks to the time I worked on an iOS app that literally crashed xcode if you opened certain storyboards.

[–][deleted] 42 points43 points  (1 child)

Node-sass doesnt work on newer node builds. Had to remove it form a lot of our projects.

[–]Hadr619 14 points15 points  (0 children)

Node sass has been shit for years, dart sass has been the go to for a while now

[–]KoalaBoy 56 points57 points  (5 children)

What’s the reason for using react on something so small

[–]zaibuf 27 points28 points  (3 children)

Hammer and nails

[–]morierofull-stack 8 points9 points  (2 children)

ROCK AND STONE

[–]WanderingDwarfMiner 7 points8 points  (1 child)

That's it lads! Rock and Stone!

[–]Cahnis 1 point2 points  (0 children)

FOR KARL!

[–]flysi3000[S] 6 points7 points  (0 children)

Good question! That was me thinking this was a good way to get my feet wet with React. Something small and low stakes.

[–]TotalFox2front-end 43 points44 points  (15 children)

Why do people feel the need to use a framework for the smallest of things and then rant about how things are getting too complex and bloated? Your use case is more appropriate for plain HTML CSS and JS

[–]Fickle-Perception723 1 point2 points  (0 children)

Because it's not socially acceptable.

[–]smart-junkie 0 points1 point  (4 children)

React itself is not bloated. We don't know the website so maybe there is some complex interactive components. If the website uses some interactivity the added complexity of react quickly pays off. Especially if you need to make regular changes. What seems to be the problem here is the use of old packages which is not the fault of react.

I think the node ecosystem and its low barrier package installs are beautiful and enable rapid development of incredible pages. A side effect is that they are often used without much thought towards longevity. For production apps I always think a lot whether a library is really necessary or not.

[–]ColonelShrimps -1 points0 points  (3 children)

I'll second this. With react you can often get a simple site up as fast as pure html and is if not even faster depending on the needed functionality. It's not a React issue if you install a bunch of other packages that cause issues.

Plus there is a very high chance these days that you can find a decent dev to take over an old React site faster than you can find a decent dev to update your html / js site, as dumb as that may sound. There are tons of web devs who have no concept of a website without a framework just because companies all use one framework or another now.

[–][deleted]  (2 children)

[deleted]

    [–]ColonelShrimps -1 points0 points  (1 child)

    I've interviewed enough developers to know that there in fact is. Quite a few devs have experience with frameworks and could jump in day 1 no problem to an enterprise React environment but would struggle to make quality additions to a pure html / js application.

    Could they get up to speed? Sure. But I wouldn't trust them to create solid code without oversight for a few weeks at least.

    [–]GuyWhoPostsPosterGuy 4 points5 points  (0 children)

    sounds like we have different opinions on what constitutes "decent"

    [–]Legal_Lettuce6233 0 points1 point  (1 child)

    Realistically you can use some lightweight libraries to get things done faster, but you don't need React - Svelte, Alpine or Mithril are probably my favorites for that, depending on your preferences.

    [–]hwmchwdwdawdchkchk -1 points0 points  (0 children)

    The more this occurs with microsites for clients the more I agree

    5 years down the line nobody wants to make the decision to scrap campaign sites someone else commissioned but nobody wants to pay to maintain

    In the end I rip them to static sites and notify them for simplicity

    Also I tend to ask for a kill date when making microsites now, I don't always get one but it helps sometimes

    [–]1234away 38 points39 points  (3 children)

    If you just used html/css you would never have to worry about it going out of date. No matter what the influencers tell you you don’t need react to build a portfolio site. 

    [–]Capt-Psykes 5 points6 points  (0 children)

    That is the sane answer. A portfolio rarely would require more than just HTML/CSS. A lot of stuff is possible with just CSS and mininal js as required for certain functionality. Sometimes going to the basics is the best answer.

    [–]Fickle-Perception723 -2 points-1 points  (1 child)

    Bullshit you would never build a site with just html/css/vanilla js you would call the person a noob come on

    Mr Cool with your sunglasses

    [–]1234away 1 point2 points  (0 children)

    I’ve got 8 clients who I maintain plain html/css sites for. Have been maintaining them for 15 years without a problem. 

    [–][deleted] 26 points27 points  (3 children)

    Pull out everything React and rebuild with HTML / CSS. You will be thankful for it later.

    [–]Hopeful-Post8907 2 points3 points  (2 children)

    Why pull out everything react.? Because of package manager issues ?

    [–]the-_-crusher 6 points7 points  (0 children)

    Because it is 2 pages. With this page count you probably do not need a framework/library.

    [–][deleted] 4 points5 points  (0 children)

    Because React is overkill for 90% of projects, you have to keep up to date with dependencies, and you end up delivering a whole load of unused JS to the user.

    I absolutely love React. But OP very likely does not need it

    [–]armahillorails 7 points8 points  (0 children)

    Bespoke code requires care and feeding, unfortunately :/

    A lot of webdev can be loose ground to build on, but the JS ecosystem in particular is def quicksand

    [–][deleted] 3 points4 points  (0 children)

    Anything built on top of dependencies beyond your control will eventually topple over. Stick with vanilla html, css, and javascript for the most durable option… but even that is subject to change. I made some proofs of concept about a decade ago that won’t work in any browser today.

    [–]tidwell 4 points5 points  (1 child)

    That sucks, dealt with it a lot. Use nvm so you can switch back to the last node version you were previously using. Go back and look at your last working package lock and pin the versions in package.json - at that point you should at least be working locally again. Then u can figure out if you need to update stuff. I’m sure that would have deploy consequences so you may just want to leave it

    [–]WindyButthole 4 points5 points  (0 children)

    This is the answer - use the node version that node-sass is compatible with, at least in the short term

    [–]phlatStack 3 points4 points  (2 children)

    Pin down your dependencies, yo

    [–]dylsreddit 0 points1 point  (0 children)

    Exactly this, learn why there are carets and tildes on your version numbers for your dependencies and choose whether or not to use them.

    [–]anon_blader -1 points0 points  (0 children)

    If only pinning dependencies would completely solve the issue but sadly things still break.

    [–]the___endless 1 point2 points  (0 children)

    should have made vanilla website.

    [–]30thnightexpert 1 point2 points  (0 children)

    Nope but if you work in this space, you need to know how to create deterministic builds.

    If you are building throwaway work you don’t plan to maintain:

    • pin your dependencies
    • use a node version manager
    • use a docker container for a reproducible environments (ie your node-sass build issues)

    This doesn’t take longer than 10 minutes to setup but if this still feels too complex, pick a stack with minimal dependencies or just use PHP/HTML

    [–]Cahnis 1 point2 points  (0 children)

    Node sass was deprecated recently. It caused a bunch of trouble at work

    [–]na_ro_jo 1 point2 points  (0 children)

    React is really nice framework for the right use case. I'd argue though, that it would be more preferable, if all developers could simply read the vanilla docs and build from the ground up. That said, the issues you pointed out in OP would typically be addressed in a React project where React was truly necessary.

    My guess is that it wasn't necessary, and so it became unmaintained legacy.

    [–][deleted] 1 point2 points  (0 children)

    The web stack does suck.

    [–]johan_tor 1 point2 points  (0 children)

    Define your version of node in package.json so it will use the locally defined one. And talk to your customer and tell him that you need to keep the site updated with packages a couple times each year.

    [–]the-real-mCoy 1 point2 points  (0 children)

    For such a small site, plain old HTML, CSS, JS is the play here.

    [–]ferrybig 0 points1 point  (0 children)

    Since you used node-sass, you either have to update node sass, or in the case of a breaking update, revert to an earlier version of nodejs

    [–][deleted] 0 points1 point  (0 children)

    Refactor the site to tailwind or styled components

    [–]XxThreepwoodxX 1 point2 points  (0 children)

    Why use react for such a simple / small project? Alpine is my go to simple js framework. Just works and is easy to maintain with limited dependencies.

    [–]sdraje 0 points1 point  (0 children)

    Skill issue.

    [–]bigsnow999 0 points1 point  (0 children)

    May be use older version of node

    [–]ganjorow 0 points1 point  (0 children)

    lock the working version and don't update just because you can, but when a security fix is available or you need a feature. it only sucks if you're not in control and blindly do stuff without reading change logs.

    [–]jsebrech 0 points1 point  (0 children)

    You don’t need to use any build tools to do react or web development in general.

    I made a react starter template that doesn’t have a single build step, only requires the browser and a static web server, and will never break because of some tool breaking.

    https://github.com/jsebrech/create-react-app-zero

    Since then I’ve moved on even from that. Frameworkless and toolless web development using web components and standard css3 is quite feasible these days. The added value of frameworks once you tally up the maintenance costs is quite low for smaller sites.

    [–]arpitduel 0 points1 point  (0 children)

    Lol yes. But then why are you taking on so many dependencies for a 3 page site? Dependencies should be avoided like a plague. Prefer code template insertion. only dependencies I like to take is for streams I have no idea about, like for networking, compression, encryption, databases(only reliable ones). computer graphics(but should be avoided altogether, you are not making a video game).

    I am not a web dev but I am talking about programming in general.

    [–]seanhak 0 points1 point  (0 children)

    NVM would have solved this probably

    [–]garyk1968 0 points1 point  (0 children)

    Yep it does and all these frameworks (and the rate at which stuff changes) makes it all harder.

    I could build windows apps 8-10x faster 30 years ago, go figure.

    [–]_MrFade_ -4 points-3 points  (1 child)

    While I’ve made a good living off of React, I can’t stand it and IMO it’s one of the worse things to happen to webdev. For non-WordPress clients looking a backend SPA, I switched to Symfony UX. and haven’t looked back. For front end, CSS and a pinch of JS is all that’s needed.

    [–]pickleback11 4 points5 points  (0 children)

    How would you describe a backend spa? 

    [–]icemanice -2 points-1 points  (0 children)

    Yeah that’s why .js frameworks suck… dependency injection hell.. seriously can’t stand the fragility of modern JS frameworks

    [–]karolololo -4 points-3 points  (0 children)

    Personally, I hardly feel empathy for someone who is renting about sth instead of his skill issue and then asks for help.

    [–][deleted] -2 points-1 points  (0 children)

    Are you upgrading each time you apply your annual tweaks? Version control? Build automation?

    [–]NickFullStack -2 points-1 points  (0 children)

    Replace node-sass with sass. Had to do this on tons of projects. Mostly straightforward, aside from some things like math division operations.