5 ms·
It's a great point that you don't need to use these things if you don't want to in your projects, but the caveat is that you will often end up working on projec
by wcarss 6y ago
It's a great point that you don't need to use these things if you don't want to in your projects, but the caveat is that you will often end up working on projects other people created, and they might have done things like use a feature just because it seems cool, or create the project from a template that includes the kitchen sink and eventually rusts through.
In those cases, you have to understand the rusty sink at least well enough to fix it, and hopefully well enough to assess if it was the right tool for the job, and how to safely remove it if it really wasn't.
A great example of this is actually create-react-app. Many people who have no idea what they're doing start off an app using this toolset and end up with a boatload of things they aren't even aware of, like a half-baked service worker that by default caches the app's code in localStorage to enable offline app functionality!
My own experience with that specific issue was of people building a production system on top of an ejected create-react-app, who ended up with deployment issues where some users arrived to a blank page after some deploys. It just seemed to happen randomly.
It turned out that after some deploys, for some users, the default CRA service worker's cache and the webpack js minify+chunk configuration, and the 404 redirect configuration for firebase, didn't play well together. You could end up with new code calling cached code which requested chunks that didn't exist anymore, and getting served html 404s with status 200, so the cache wouldn't bust properly. Understanding this, debugging it, and solving it safely (in part by safely deregistering the service worker for all users) took ~days!
The really upsetting part is that no one involved in building this app (neither founders nor original create-react-app-running devs) ever wanted service workers, nor a progressive web app offline code cache, nor code chunking, nor optimistic 200-html pages in place of 404s. But those were all default options and packages and stackoverflow copypasta that got cargo culted in, and it produced a bit of a tower of crap.
- dceddia 6y agoThat default service worker setup was frustrating. Even for local development, it would mess things up sometimes. Luckily they turned it off for new Create React App projects a while back - so at least it shouldn't haunt any new apps.
- cageface 6y agoThe worst software hairball I've ever had to untangle was a react/redux/saga monstrosity that was excruciating difficult to debug or improve. I finally got permission to rip most of that out and the resulting plain react app was fairly pleasant to work on. So yeah, software development fads matter whether you personally follow them or not.
- JamesBarney 6y agoI was recently brought onto a project to add a couple of simple screens to an app. Any other react project it would have taken a couple of days so I was surprised the previous estimate was for weeks of development effort. Opened up the hood to find saga, and quickly discovered why it would was weeks of effort.