←back to thread

873 points belter | 1 comments | | HN request time: 0.233s | source
Show context
dtquad ◴[] No.42948592[source]
>Frontend development is a nightmare world of Kafkaesque awfulness I no longer enjoy

As a backend/systems engineer I recently had to look at a React + Typescript + MobX app from 2019/2020. It is true that that some things, especially the webpack config and Typescript loading, were outdated but the overall design and architecture of the app was still understandable and modern. With some help from ChatGPT it took very little time to migrate to Vite and update dependencies. By 2019/2020 React Hooks had already been out for some time but there were still some class components in the app. They were easily migrated to functional components + Hooks using ChatGPT.

replies(9): >>42948755 #>>42949267 #>>42949480 #>>42949689 #>>42951645 #>>42952358 #>>42953864 #>>42954167 #>>42960182 #
kflgkans ◴[] No.42952358[source]
If there is anyone here who has time to explain to me (or link articles about) why functional components and hooks are considered to be better than class components, please enlighten me.

Up until roughly 4-5 years ago I was doing small front-end React apps on the side (I'm a backend engineer) and was feeling very productive with class components. They made sense to me, concerns were nicely separated, and I felt I could reason pretty well about what was called when and how state was manipulated.

Then hooks came around, I tried them a few times, but I just felt so lost. Suddenly everything is intermingled in one function and we're using side effects to react to changes and manipulate state. I could no longer understand when which code was executed, and especially following and manipulating state became impossible for me.

The projects I already, I kept with class components. Haven't done any new front-end projects since then.

replies(4): >>42952500 #>>42952837 #>>42953730 #>>42954908 #
ericyd ◴[] No.42952837[source]
I only knew React until my current job, which uses Vue. I'd strongly recommend trying a framework other than React for your next project. After you're past the learning curve, it's much more intuitive.
replies(2): >>42953599 #>>42960185 #
1. Medicineguy ◴[] No.42953599[source]
> I'd strongly recommend trying a framework other than React for your next project.

This gave me a good chuckle (if you read it as next.js)