4 ms·
The question is, is it worth it? I'm starting to feel behind the curve and I want to learn new stacks like Next.js, Typescript and GraphQL. Anyone else feeling
by LAMike 6y ago
The question is, is it worth it?
I'm starting to feel behind the curve and I want to learn new stacks like Next.js, Typescript and GraphQL. Anyone else feeling this way or have already gone through that learning curve?
- cheald 6y agoTypescript is really easy to learn. You can turn it on, throw your existing JS at it, and then gradually increase the strictness level as you add typing information. It's a very painless transition.
- fuzzy2 6y agoI like TypeScript quite a lot, by itself. You should definitely take a look! Whether you use it with Node, React, Angular, Vue – doesn't matter. Whether porting existing projects to TypeScript is worth it is of course a question that cannot be answered universally. Depending on how… creative developers were when creating it, it can be incredibly mind-bending.
- Ozzie_osman 6y agoIn my opinion, totally worth it. First, you can transition gradually, just typing one file at a time if you want. Second, the type-safety you get makes incremental refactoring so much easier and makes you more thoughtful about "interfaces" (ie function parameters, etc). It also catches tiny bugs that would otherwise blow up in production. Yes, sometimes you'll run into weird cases where you have to wrestle the type system, but honestly, in the worst-case you can just ts-ignore those (though you probably want to minimize that).
- serpix 6y agoWorth it, speaking as someone who prefers how Typescript is so flexible and does not get in your way too much.
- intruder 6y agoYes, one often overlooked benefit is the tooling that is enabled by having proper types. IDEs from jetbrain in particular are great at it.
- kilburn 6y agoI have transitioned my entire team (comprising people ranging from fresh-out-of-a-bootcamp to senior 20-years-in-the-web). Next.js and GraphQL are interesting technologies, but I would say they will eventually fade. They do solve some problems, but they introduce new (hard to fix) ones. Typescript is here to stay. The improvement it brings to the development experience cannot be understated. It helps the inexperienced to avoid lots of (minor) bugs and providing much more useful autocompletion/inline docs than any javascript analyzer can. For the experienced people, it is an invaluable tool when the time for largeish refactorings comes. For the first time you can "follow-the-trail-of-errors refactor" in frontend-land.
- shriek 6y agoThis question probably varies on who I'm asking but how long does the transpiling process take for you on a, let's say, fairly large project?
- kilburn 6y agoWe were already using Webpack + babel. Adding transpilation there is fairly inexpensive (done by babel, without type checking). Type checking did roughly double our build time. Even then, we do run type checking during builds because we prefer the added safety even with this extra time. Developers run with an incremental checking watcher. It does add a significant tax, and takes a few seconds after saving in some cases (3-4). We would love that delay to go away, but it is a cost we are more than willing to bear if the alternative is not having type checking at all.
- mattlondon 6y agoI'd personally ignore Next.js and GraphQL, but would certainly (and personally have) invested in TypeScript. I am guessing that Next.js and GraphQL will be long-dead and obsolete "soon" (in the same way that e.g. jQuery & AngularJS were once also red-hot technologies but are now out of favor), but TypeScript really feels like it is here to stay with significant benefits. I guess this is a "learn technologies, not libraries" type thing? I was "forced" to learn TypeScript for Angular 2 (that was the library of choice at where I worked at the time) but now also use it for my personal stuff out of choice. Compared to pure JS it is a bit of a pain to get basic development up and running (since you need a TS -> JS compile step before you load it in the browser, unlike raw JS that you can just code and reload). For that I have created myself simple boiler-plate templates (1) that I use to bootstrap a new project so I can be up and running in a browser in 60 seconds etc (the template will do all the compilation and bundling for you using webpack) 1 - https://github.com/matt1/TsBoilerPlate https://github.com/matt1/TsBoilerPlate
- com2kid 6y agoSince Babel now supports TS out of the box, it is much easier to use. Not as safe of course, but you get 90% of the benefits.
- munchbunny 6y agoIf you've worked with a language before that uses static typing and compile time type checking (Java, C#, and C++ immediately come to mind), TypeScript will be very easy to pick up. It'll just feel like a slightly different JavaScript-friendly syntax slapped onto the same set of core concepts. Coming from a background where I had written both C# and JavaScript before, TypeScript took all of one day reading docs and messing with the toolchain to start adapting it for the React app I was working on at the time If you haven't worked with a statically typed, compile-time type-checked language before, I think you owe it to yourself to learn one, whether or not TypeScript is the one you learn.
- gherkinnn 6y agoNext is dead-easy to learn. It takes very little and you have a solid React setup. No config required. The docs are very, very good. And they have a little tutorial.
- Keats 6y agoI've used TS for 4-5 years now and I have been using Next.js/GraphQL in a work project. I would focus on TS since I don't really think Next.js/GraphQL is worth the hype and I would bet TS will outlive both by a significant margin.
- vorpalhex 6y agoGraphQL is a genuinely different kind of tool in the box, and it is at times useful in that way. Typescript is really just a tool for people who want autocomplete in VSCode for their javascript, or who really still want to be coding in C# and unless you're just dying without those things it's a lot of overhead for not much benefit.
- Blaiz0r 6y agoTypescript has made me pretty sure I don't want to be a frontend dev much longer.
- sli 6y agoTypescript has made me go looking for Elm and Purescript jobs. Not many of the latter, but I've applied for one of the former.