I’m a backend swe, using react for a personal project and taking online classes. It feels so flimsy, like you can do it that way, or this way or any other way… which one is correct? Up to you. Idk how multiple people can work together using this tech, because it seems like everyone kind of wings it or listens to maybe a team lead It also feels arbitrary how certain things are divided, especially with jsx. Like you have your main return, but there’s subcomponents that are also returning their own xml. It feels disorganized to have xml everywhere lol. I feel like it makes more sense to have all the xml at the bottom with the main return and populate things via props/state/reducer? Idk, react feels more like an art, more than a science, because i think most people just get a feel for what’s right, more than having a right way to do things
SPA is a wrong direction. Stupid idea. Server side rendering is best.
Not exclusive. Look at isomorphic apps. Even those are old now. But for past 5-10 years or so the best practice is to have server side rendering and then SPA navigation to kick in after initial page load so you not loading entire HTML pages and their assets at each navigation.
That’s just how JavaScript works right? It’s why some don’t think it’s a “real” programming language.
framework !== language (I hate that I have to use two equals here 😂)
I used react recently for a small work project and my god was it awful
All front end development is awful
Very relatable as I recently moved to a product SWE role. I had never used React but reading the existing code base and just reaching out people with even the most noob questions helped. I agree, generally speaking that having the return at the bottom with JSX is cleaner, more readable and overall a good pattern. I also tend to break the JSX into chunks especially if they change based on state or other conditionals and insert them in the return between curly braces.
I just use basic HTML and JS.
It's a tool you can use anyway you want, and when there are more than 1 right ways to do something, thats true freedom and it forces you to learn design and optimization best practices for performance, code quality and modularization. It's a learning moment for you as a swe as you start thinking about these things.
It works well if you no need to manage or a small project. I don’t know how the large projects are managed if everyone is having different opinions.
That's where having good tech leads matter. There may be 10 ways to do a thing, but for a given usecase and it's functional and nonfunctional requirements, there's one way out of those which are better than others. A team with good tech leads with insight for good design will all agree to that one option.
JavaScript is for real alpha developers, once you don't whine about Js you don't whine any language
It's a fancy toy that lets devs do anything they want in anyway they like and they like doing weird shit! So, almost all (and there are a lot!!!) JS frameworks make it a thing - that there are a million ways to do something and that's a feature people seem to like the most 😂
Sounds like you need htmx
I like htmx, more natural
I was considering this, but wasn’t sure about maturity, documentation, usage and ability to get help
Have to get used to it. If you have used other UI frameworks, they are probably worse. But I haven’t tried some of the newer ones yet.
That’s fair, I’m just getting frustrated trying to use my intuition and having to look stuff up one by one lol
I m backend engineer. Used angular and react for pet projects. Liked the angular, at least it is structured unlike react. Want to know other UI engineer opinions.