Not that most their languages are inherently better but some have a way of mitigating the problem slightly, like e.g. python's extensive std lib collection.
Not that most their languages are inherently better but some have a way of mitigating the problem slightly, like e.g. python's extensive std lib collection.
I had this moment where I thought "well, I need Typescript, because I want nicely typed interfaces and contracts, and I need React". Turns out it's not easy like that. To cobble everything together you need a proper template for webpack. and there's Babel and that also needs to be caressed in the right React-y way. You can't just "hop in". You have to use cookiecutter-styled tools to bootstrap because the whole thing just got so complex so that even a Hello World styled project needs a mindboggling amount of tools all orchestrated and plugged into each other in the right way or it all blows up in your face. Also, there are more than one cookiecutter-styled tools and you have to choose the right one. "But don't fret you can always run eject to see the whole machinery inside".
It's saddening and tiring.
Manually setting up React (with or without TS) isn't all that hard, either.
Your first mistake is trying to add typing on a dynamic language that works just fine without types. You won’t really learn the underlying language that well that way, and you therefore won’t have a good understanding of it.
TypeScript makes sense in large projects, with many developers where you need to catch a class of problems that compile time type checking can catch. It doesn’t offer a lot or add much in the way of actually learning the fundamentals of frontend development and is a distraction when viewed through that lens.
Are you sure you weren’t actually avoiding the scary unknowns of actual learning and doing a bunch of busy work to bring familiarity into an otherwise unfamiliar space? I catch myself doing that a lot, especially if I need to learn a completely new language to learn something. I wasted a lot of time trying to make OpenCV work with native JavaScript when I should have just learned enough C++ to get by.
Manually setting up React isn't all that hard, but it's extra friction you don't need when learning to code React (and probably 999 out of 1000 times using it in anger, either.)
So, yeah, using CRA or another template is generally a good idea.
> Also, there are more than one cookiecutter-styled tools and you have to choose the right one
No, you really don't.
I would tell the exact same story if I was to decide to use Python as backend, just with different technologies. Maybe you just tried to do too much too quick. I can build a Python script, just like you can probably build a JS script, it doesn't means that I can just jump into Django head first like it was nothing. You can't just "hop in", you need to learn each step, and that's fine. The number of times I thought it was as simple as a "pip install"... lost quite a bit of time in various CTF while trying to use some Python scripts. You also can stop at any steps, and that's fine too. I know that HN is good at "THIS IS THE ONLY RIGHT WAY", even this thread if filled with people arguing that "web0" is the "right way", but you know what, the right way is the one that works for you, even if it means that some page will take more time to load, or takes more data transfer, or is missing interactivity, or has a less optimal UX, or can be done faster in another way, or any other downside.