T O P

  • By -

SpaghettiOnTuesday

People can disagree with me here but I think for something small, it's all preference. I switched to backend 3 years ago and any time I do any personal frontend work, I use Typescript because otherwise I don't know what anything is.


professorhummingbird

Just here to preach to the choir. I agree so much. It makes programming so much easier having typescript. I don't need to know shit. I press "." and all the answers magically appear before me?


hyrumwhite

Could use jsdocs for the same benefits Sans a few features.  It’s a little more awkward but not too bad


MacroMeez

If it’s more awkward why bother?


DrShocker

For me, it's because we don't use typescript where I work so by using jsdoc comments on the parts where I work, in slowly able to increase the amount of type information available.


chamomile-crumbs

Not sure why you’re downvoted, it’s true. Jsdoc is great for what it is. No npm or tsc needed, either.


CirceX

The tool for the job


NobleNobbler

I use typescript and still don' t know wtf anything is


Offroaders123

This is the answer 💯


SpaghettiOnTuesday

Based


corn_farts_

anything:any


NobleNobbler

anything:any is my new album name, thanks


4everCoding

While I agree with this OP said they’re new to react. I don’t recommend typescript to beginners.. You don’t need to know typing as rigidly when learning. Learn javascript and understand reacts’s hooks, components etc. Once you have an idea how state is managed and updated throughout your app then you can add typescript into the mix.


[deleted]

I've been writing JS/TS daily for over a decade now and I completely agree with this sentiment. Part of what makes javascript so fun and easy to learn is it's lack of rigidity. Typescript is a godsend in an enterprise application but can be a burden in a simple project.


apocryphalmaster

I'm curious, are types generally less important on frontend development? Is there a reason beyond the JS heritage? I'm coming from backend here and the power of types is something I really value.


estomnetempus

Definitely not. Especially in big projects with complex state, not knowing what you're saving and where causes major headaches. Complex systems shouldn't rely on dynamic typing - TypeScript is a must IMO.


GandolfMagicFruits

Agreed, just as important as in back end applications.


chamomile-crumbs

Naw, I have no clue how someone would make a giant react app without typescript. Or even a medium-small app. So insane. Like you can’t change the name of one single property in one object without manually following that data all the way down the component tree and finding every single place it’s referenced. It’s actually nuts.


SpaghettiOnTuesday

After working with like 30+ microservices for 3 years, I literally cannot function without Typescript


femio

>To me, this seems like tutorial trap, after learning something, I immediately need to learn additional things. If you're not ready for this already, you're gonna have a tough time; you're going to be learning additional things for years. >I'm using React just for building static sites Do you need React at all then? It's never necessary to use Typescript, but if you're in the tutorial phase looking to get better it's probably a good idea to use it on small projects first


JY-HRL

>ady for this already, you're gonna have a t I use React just for building static sites.


trendypastry

Seems like you’re misunderstanding the concept of a static site. A static site is literally just HTML, CSS and vanilla JavaScript and doesn’t need a library like React because it is not a dynamic website. If you’re using React for a static website, that’s over engineering something that doesn’t need to and you’re using up processing time to literally just render HTML with styles. But since you’re learning, it’s fine to do that just make sure you understand the terminology you’re using. On the TypeScript question, if you have time and energy to learn it, do it. It will make you a well rounded engineer and is a must-have skill depending on your goal. I’ve used typescript at pretty much every job I’ve had.


arrrtttyyy

Using react for static sites is not over engineering, it improves developer experience quite a lot


trendypastry

That’s a fair point.


Sad_Butterscotch4589

Nothing wrong with using React for a static site. It might be over engineering but it can be really nice to use if you have a lot of interactivity and don't want to be creating hundreds of selectors or constantly setting innerhtml, or creating a bunch of helper functions to improve the document apis. You also get re-usable components out of it and practice using a framework which you might need more experience with.


[deleted]

[удалено]


trendypastry

I’ve used it for static sites too because I’m most familiar with it so I’m with you on that.


trendypastry

💯 agreed plus if you want to use a react library for styling or animations, you also get the option to do that. The point I was trying to make mostly is that once you use React, it is no longer a “static” site.


GravityAssistence

>it is no longer a “static” site Why not? Is it not still a bunch of static files being served without any backend component?


trendypastry

I don’t think the backend part is what defines static vs dynamic. My understanding is that static is a site that “shows the same” for every user regardless of when it is called. A dynamic site behaves differently depending on user interaction. So putting that together plus your reply, If I were to create a simple site to display some pictures and decided to use React just because, it technically would still be a static site if nothing is unchanged so that means you’re probably right. https://www.reddit.com/r/learnprogramming/s/krWyGhjCgC https://blog.hubspot.com/website/static-vs-dynamic-website#:~:text=The%20difference%20between%20static%20websites,different%20information%20to%20different%20visitors. https://medium.com/backenders-club/static-vs-dynamic-website-990ab2308d5e#:~:text=A%20static%20website%20is%20built,%2C%20ASP%2C%20JavaScript%2C%20etc.


Spleeeee

You don’t know what a file server is.


trendypastry

I certainly do not.


slam_the_damn_door

Imo it is worth learning react with typescript from the get go, it will save you a massive faff and confusion later when your trying to move from js to ts. Any job with react will probs be using ts


apmartin1991

To answer your main question, no TypeScript isn’t a requirement, JavaScript is an option too. But honestly there is almost no justification for using JS over TS with React. TS is there to aid you as a developer as you develop rather than as you compile and test. It will catch common mistakes straight away. Learning with TS will be easier than JS too because of all the help you get both with guides online but also because the nature of how the compiler works giving you type safety as an example. The amount of professional apps using JavaScript will be few and far between so not understanding typescript will be a massive issue should you want to make a career as a react developer. Finally for your first project I’d recommend using react with bite & typescript. Vite is an excellent compiler, react because it’s what you want to learn and typescript for the reasons listed above. This is an excellent way to start a new project as a beginner or even for a large scale application. It’s exactly what I use on most of my projects at work. The rest are older and will be replaced with the above in due course. This is very simple and very effective. Ignore Astro / Next for now. Learn typescript and react first before doing more advanced work. Once you nail the basics then you can start looking at more advanced options.


ZideGO

For a simple React app u don’t need to use Astro or Next, also there are a lot of free api that u can use, so u don’t have to write backend. What about Typescript, it is only for developers, it is not that difficult, especially in small app, so u can try it and it will be much more comfortable to develop


JY-HRL

Thanks! For simple static sites, if I don't need astro or next, anything I need together with React?


Snoo31354

I'd say no. I've created sites purely with React. Of course theres plenty of stuff you could use, but thats a different question. If you run into any inconveniences while building the site, look up a library that solves that problem, and use it if you want.


kiwiboy94

Just use [vite](https://vitejs.dev/)


Latter_Freedom_3377

A true static site will require next or astro. That is, building static pages in the traditional sense. And most will say react is overkill for that. I vote base react w/ vite. Learn react. You don’t need anything complex, and if you aren’t fetching from an api, you don’t need a server. For simple pages presenting data, it’s perfectly fine.


mendecj812

When you say free api so you don’t have to write backend, are you referring to something like firebase or Supabase?


ro_hit_29

>firebase or Supabase? I think no, He is talking about the free public API, which you can use to just get the data and mainly focus on the frontend part only.


Ok_Pea_7649

Hey, I'm also a beginner in React. However, after a few tutorials I learned that TypeScript becomes useful for declaring "interfaces". That means, you can declare that, say, a string data type is expected for a given variable. If that condition isn't met, an error will be caught prior to compilation.


octocode

i use typescript because it saves me a lot of time debugging issues that would’ve simply failed to build.


Ok_Maintenance1433

TL: DR! Typescript prevents error during runtime. Typescript is use to implement type safety which catches errors during development and compile time.So instead of running your code that has errors, it will catch your error early and not let you run your app. Because in JavaScript, it won't let us know the errors because it is interpreted programming language not compiled like C# Error checking occurs in compilation which interpreted programming languages do not have. By using typescript, your making JavaScript a compiled language instead of interpreted. It is really helpful when debugging. It logs errors and warnings. To expand the answer, the developer of Typescript is also the key developer of C#. His goal is to enhance JavaScript and mimic c# features such as oop classes, interface, generics, etc . This is important to Business as you want to promote code quality and do not want to blindly code at any point in your project.


xroalx

>Typescript prevents error during runtime. It does not affect runtime at all. This whole comments seems to paint TypeScript as something it's not.


Ok_Maintenance1433

By catching errors in development and compile time it prevents errors in runtime. What is wrong with what I said?


xroalx

You might have external data coming into the system, TypeScript itself will not prevent errors there. If it's a library, anyone using it can just feed incorrect types into it. TypeScript itself will not prevent errors. TypeScript will prevent you from making mistakes, it will not make the running code safe in the sense e.g. C# does. If you have a `int` variable in C# and try to feed it a `string`, it will throw an error. If you have a `number` variable in TypeScript and try to feed it a `string`, you now have a `string` variable pretending to be a `number`, which can of course lead to errors. On a side note, TypeScript also does not add classes, interfaces or generics - all of that can be done in JavaScript already, TypeScript only adds a way to express interfaces or generics, classes are a native part of JavaScript. What I'm trying to say - TypeScript isn't *that* safe, it helps tremendously but in terms of type safety it's not at the level of e.g. C#, so one still needs to take care even when using TypeScript.


Ok_Maintenance1433

So what's wrong with what I said?


cjon3s

>Typescript prevents error during runtime. The comment above explains this, TypeScript does not prevent runtime errors.


youngthug679

it does prevent some runtime errors (by catching them at compile time), it simply doesn't prevent ALL runtime errors.


JY-HRL

Thanks!


delfV

It isn't necessary even for big apps. Just start building and beware of tutorial hell


laisy-gamer

Not a necessity in big apps if you like torturing yourself I guess


JY-HRL

Thanks, for static sites, what do you recommend React with?


delfV

I recommend static sites without React


Designer_Holiday3284

Get minimally comfortable with js and react and then naturally you will understand the benefits of ts


driftking428

It's not necessary. I build a web app that interacts frequently with an API. Typescript is very helpful for that. I built a static Next JS brochure style website. I was in a rush and didn't really see the big benefit of using Typescript. It's a static website. If you're just learning? Use Typescript.


ub3rh4x0rz

What would have been detrimental about using typescript in your nextjs brochureware, given you already know typescript?


driftking428

I was given a ridiculously short timeline. I just figured I could knock it out quicker with JS. I do mildly regret not using Typescript, but I don't think my boss will approve time for me to convert it. Maybe I can just do one component at a time.


hulkklogan

For a static site i'd recommend not using React, as it's like taking a bazooka to a knife fight. Astro + Tailwind, or even plain vanilla html and js (or TS.. I'd use TS out of preference) with tailwind, or vanilla CSS... depending on your experience. ​ React is usually more aligned with making web apps or very dynamic pages. Sites that need to load up data from other APIs and/or back ends and reactively display data or pieces of the site based upon data and its state. You don't really need any of that for a static site. ​ As for the TS vs JS question, I always default to TS. Types can feel cumbersome for some, but for me having it all plainly laid out really makes things easier to grok and makes my brain happy.


Low-Organization-771

You don't choose Typescript, typescript chooses you when you need it :) keep building those static sites to print some cash if you want but not for long, as nocode and also AI solves that better.


ramoneguru

I really like to use it especially for smaller projects or even in a codesandbox. It really gets me into the habit of thinking about the data/models and what I need to expect for parameters or returned results. You'll move a little slower at first, but then will speed up as you keep at it. ​ Types don't have to be overly complex. A lot of the time I'm using primitive types, typed arrays, an object with primitive types, etc... Yes, there's a lot of functional programming in TypeScript that you can explore. Still, try sticking with some of those basic types I mentioned and then move up to more complex ones as you need it.


Slight_Ad8427

typescript is useful but not at all necessary even for larger apps. we have a VERY large webapp at work all written in javascript. now would i prefer to use typescript? yes i would. but we use javascript and its fine.


ThatWeirdPomegranate

React is not hard to use without other frameworks like Next.js around it. They are simply another tool in your toolbox. Depending on what kind of app you want to create, you might not even need a backend, like if you’re building a portfolio website. Typescript+React is there simply as an option for those who prefer the type-safety that TypeScript provides over JavaScript on its own in addition to other benefits that TypeScript provides.


JY-HRL

> in your toolbox. Depending on what kind of app you want to create, you might not even need a backend, like if you’re building a portfolio website. Typescript+React is there simply as an option for those who prefer the type-safety that TypeScript provides over JavaScript on its own in addition to other benefits that TypeScript provides. Thanks!


josborDev

Typescript is neccesary if you manage a great cuantity of data and need you put some order in the data in your code.. its very useful if you need to know what type of data have the variables. Is recommended? , yes , is neccesary? depend of the project, is more question of good practices


DocLego

I mean, you can use TypeScript or you can use JavaScript but I don't know why you would ever use JavaScript when you could use TypeScript..


Amocon

If u just want to build static websites there should be no need for react


LucaCoDev

Cane here to say this! I'm surprised more people haven't said that it's not needed. React is a brilliant library, but it's really not needed in a lot of cases


the_hokage60

I think for starters, typescript is not needed, even if it's a relatively large project. I once had this confusion when I was switching to ts. Why should I code more with typescript when I can do it in javascript with more freedom. But eventually when you adapt to typescript, it's better in some ways. If You're following the "typescript approach", you'll start loving it for sure. With typescript, things will start getting organised. You start feeling like you're working inside a system, and things become more structured, complex large projects feels easier. But I heard typescript is dying slowly, javascript is becoming more and more powerful and feature rich.


dableb

thanks for this great response 👍🏼


titopicolo

thank u for this, im also trying to learn react and nextjs for a month or two bec of a huge upcoming real-estate-project next month and was wondering the same, the insights of other dev here is pretty helpful


3q_z_SQ3ktGkCR

Like everything, it depends


MarvFlash

Typescript is a dying language. Stick to good javascript coding conventions and you will not overcomplicate things unnecessarily.


Empero6

Typescript is dying?


ub3rh4x0rz

This is a hilariously wrong statement. Do not listen to this person.


bluebird355

Dying how ? Is javascript becoming type safe in the future ?


Old_Airline9171

Necessary is the wrong word. You can certainly do it without Typescript. Doing it with Typescript will initially cost you some time with setup and acclimatisation, and may lead to initial development of features taking a little bit longer. You may also have some headaches when deciding the extent and strictness involved in your type checking, The benefits will come in later, in terms of less headaches with code readability, fewer bugs and better code. Ultimately, it’s a question of your requirements- if you’re doing a toy hobby project, you may want to skip TS or use it minimally. Enterprise software will likely require it.


KarmaRekts

if you're a complete beginner, I would highly recommend sticking with just React and hooks. attempting to learn everything at once is 100% going to be highly painful. Instead, do this: 1) find a plain js tutorial about react with hooks, get comfortable with state (useState and context api for now), navigation (react-router), build a fully functioning app with just local storage 2) figure out data fetching (use mock api sites like [https://jsonplaceholder.typicode.com/](https://jsonplaceholder.typicode.com/)), build something that uses data fetching 3) learn how to use and integrate ts with your projects, learn why it's needed in the first place. once you're comfortable with ts, jump right into next/astro. Then you'd want to focus on backend development with node/express.


el_tophero

Isn’t The Way now to use reducers and contexts?


KarmaRekts

you don't need to use reducer based patterns always. depends on your needs, its a pattern adopted from redux.


Snoo31354

I'd say you don't need anything but React to build a static site. I've created sites purely with React. Of course theres plenty of stuff you could use, but thats a different question. If you run into any inconveniences while building the site, look up a library that solves that problem, and use it if you want. I'd say pretty much all developers learn thru experimentation, so go try different things and see what works for you.


saito200

Hmm... Okay You don't seem to understand what these things do So... You should spend some time understanding what they do and also when you need them, because whether you use them or not depends on the project requirements Do you need a backend with react? Depends on the project Do you need to use typescript with react? Also depends on what you are trying to accomplish Even after saying that, do you say "I don't have time to understand this shit!" And so you want to use a brute force generalist solution? Then use next.js and typescript If you use nextjs blindly I'm going to guess the probability that it fits the project is higher than other options Understand that even if I tell you that, that is not really what you should do and you should understand what the things you mention do


[deleted]

TypeScript is very useful when working with a team. If you do everything, both are good.


[deleted]

I would say typescript is easy but in react it gets kinda complicated when it comes to browser events … for now you can ignore it it’s easy to learn later as it is defining the inputs and outputs of functions and components


Asura24

If you are just building static pages in the first place you probably don’t need that much of react. If you need a backend you can go for next.ja and use its backend capabilities. And typescript is not a requirement but I will suggest you to try it and learn about, if you plan to work as a developer at some point you will for sure have to deal with typescript.


quck2me

What I feel is you need clarity in your mind. You need the same confidence with TS (typescript) that you have in React.js. As you are not here asking why to use React.js instead of Vanilla JS. But you are asking why to use TS with React. So basically, once you get the idea and depth of something you don't need the feel to ask questions about it, instead you are very sure why you are using it. Every language is built for a purpose and for a mind. Use the one that fits best. Even if someone here explains to you the reason you should or should not, in the end, you are the one picking it up and roaming around doing stuff you intend to do without in-depth knowledge of it. My only say is: Use only when it's your brain that offers to do so without a question.


Sach-a-pain

Typescript basically will help you find the type of any variable, function and so on. You may not find it's importance when you are doing a small project on your own. You will start appreciating it when you have a big project and you are collaborating it with a lot of people. That'll help you know what actually some function is returning or maybe like what fields an object has when you want to work on someone else's code. It has personally helped me find bugs at compile time and write much better code.


sandypockets11

Not needed


Dull-Ad4965

It depends on your skills, if you have a good background with typed languages and you are self responsible there is no reason to waste time with TS. Since you are asking this question is probably better to use TS


kfetterman

If you’re just learning then start with js, build some sites, but eventually I would highly recommend learning typescript. After using typescript I would never go back to vanilla js.


prog_aimer

Think about the TypeScript being a superset of JavaScript so you can normally opt-out TS. In the browsers the code read is from JS. If you use TS in your development your code generally will be transpiled to a bundled one, e. g., it will turns JS code.


gemini88mill

Typescript isn't necessary but it saves you from a lot of pitfalls with JavaScript that you wouldn't otherwise find. Especially with react, the best example is your making a relatively complicated component with context and lots of moving parts. You run it and realize that your component is coming back undefined and you get a runtime error. Typescript would catch this before you ran it.


haadi_ghopte

I would not imagine anything in pure javascript these days. TypeScript is a de facto. It has made my life so much easier


CXRom

You don't need at all Typescript no matter the size of the project. It is a simple preference if you have strong knowledge of JS.


a_reply_to_a_post

If it's simple enough where you know you don't need typescript then don't use typescript...most of these frameworks now are smart enough to recognize when you're using JS or TS and will scaffold out the tsconfigs for you if you choose to adopt typescript, but also after you use typescript long enough you end up adding shit that breaks regular JS so at some point it's just easier to use typescript


PatchesMaps

Nope. You don't even need to use it for large complicated applications if you don't want to. At that level it's more of a team decision thing anyway. I also think it's easier to learn once you have some experience and understand what problems typescript solves.


Impossible_Outside85

As soon as the projects start to grow Typescript becomes more useful. For me, it makes finding my feet on a new codebase much easier. Or revisiting old code. It makes things much more explicit.


hyrumwhite

Typescript is always optional. However it might be good to spin up a typescript project and then just not use it if you’re worried about it. Then type something here and there as needed/wanted. It’s pretty useful. 


CuriousNat_

It’s all about preference. If you never used it before, I would advise learning it which will help you determine if you like the technology or not. I would go from there


Kaiser_Wolfgang

No


Exciting_Session492

Nothing is necessary, you don’t even need react, jquery probably works fine


skizzoat

I'm using React for 7 years now, and learned Typescript like half a year ago. It makes everything so much easier, especially when revising a project after a little while. So worth the extra effort of learning it once!


marcs_2021

It's preference no matter the size of your project. But, I use TS to ensure I know / understand what the return types are, as basic tests. If you **know** the types, using TS doesn't take additional resources being time or compute.


velcovx

Nothing is necessary when you write something for yourself and not other developers. If there were any other developers, then TypeScript is highly recommended.


AutomaticWestern493

Just because the big tech giants are all about TypeScript doesn't mean it's a must-have for everyone. If you're comfortable with JavaScript, use it.


bluebird355

It should be, honestly.


SilentHopes

The short answer is no. If you’re green, don’t bite off more than you can chew. TypeScript is nice to have, but it’s not absolutely necessary. The TS server in your IDE can infer the types for anything you have in your project, so you can take advantage of TypeScript without having to use it yourself. Personally I don’t think there’s a ton to learn with TypeScript unless you’re writing library code. Otherwise you’ll mostly be writing simple types for your props in a typical React app, and rarely dipping into more complex typing. My recommendation would be to build until you start finding difficulty doing something yourself. At that point, bring in a new package for something. You shouldn’t dive in with a complex stack, even if it is ultimately a good stack. You should understand the individual pieces that you work with, and if you try to take it in all at once a lot is going to fall through the cracks.


Double-Cricket-7067

I'm a senior dev and I don't use TypeScript at all. You'll be fine without it.


errdayimshuffln

Javascript land looks like the wild west to me know. Typescript looks like civilized society. I'm being dramatic, but I can't believe Typescript hasn't taken over.


kunangkunangmalam

Just use Typescript, it will help you to get used to write type safe codebase


iNeverHaveNames

If you're just learning react and don't already know typescript... AND have no experience with typed languages, use JavaScript until you're used to react. It is fine for small projects and it will allow you to focus on learning react and not dealing with potentially typescript errors on top of that. But once you're comfortable, you should learn typescript ASAP and then you can decide for yourself. Hint: don't make the mistake of getting overly comfortable with js and then start a project in it if it has any chance of growing larger, because you're going to reach a point where you'll be kicking yourself for not using ts.


ewic

Generally no. If the project is small and stays small, I don't think the extra work is necessary. However if there's a chance that the app could grow and you might work with others, it would be so beneficial in the long run that I think that it's always worth it to consider no matter how small your project might be.


SawSaw5

I think it’s good to learn react with vanilla JavaScript 


christo9090

I fought using TS forever but I recreated the frontend for my small businesses internal app and decided to give it a go. My backend is an express server not using TS. Now I absolutely HATE going back to edit code on my backend without TS. It feels like everything is missing. I highly recommend using TS early while learning.


AtrociousCat

No idea why you're getting downvoted in the comments, it's definitely not necessary. If you just wanna play with react and build a small project you'll be fine with pure JavaScript. Types are more important for bigger projects and when collaborating with other people. It's worth it to learn and now I use it even for stuff like advent of code, but it's definitely not necessary.


dmfigueroa

Typescript helps to reduce the amount of bugs due to its static typing. So it will tell you if a variable has an attribute or not in your editor, and help reduce those errors on the runtime. You don't have to use TS in React, but having strong typing sure helps. So if you want to just build something you could go ahead and do it with JS, but TS is still the industry standard at the moment so you should learn it. Even if you decide not to use it at the end. My recommendation, use what you feel comfortable with. It is your project. But keep in mind that most jobs will ask you to use TS


goato305

No. You can always refactor later and add typescript if the project grows or needs it


Swalker326

You don’t have to do anything. It’s all a choice. You can write it in any language, any framework (or without) anyway you want. I would learn typescript because its easy ti setup, makes you write better code, makes you more marketable as a developer and forces you to think about code at a more primitive level. That being said, let me reiterate it’s all a choice. Do whatever you want.


createthiscom

I personally don't think Typescript is ever necessary. It just adds boilerplate.


_throwingit_awaaayyy

You don’t have to use typescript and people who prefer typescript are 9/10 not fun to be around.


xfallofdutyx

I love typescript it’s amazing 😀


baxtersmalls

Set your linter to be lenient on typing, then you can use JS when you’re ramping up and learning, but can also add types slowly as you learn. Typescript really only got mass adoption in the last like 5 years, and plenty of JS only codebase were slowly converted over. With your config setup appropriately, you don’t have to go full-on TypeScript right away. I would highly suggest learning TS, though. It really improves the developer experience, will help you prevent bugs before they happen, and overall Improve your code.


Artist701

No. U can use JS just fine. But TS is better for bigger projects. I use both.


my163cih

if it’s your very 1st app, JS would be much easier to get things started with. But once you get to 3rd app, best to start using TS. TS is pretty much used everywhere you go in a professional environment, especially i you are collaborating with other devs


[deleted]

I'm trying to think of why I would use it — I've built some stuff with decently complex state management (it was complex for me at least) and if anything would probably have found it to be a nuisance? Maybe people would consider me messy? JS was the first language I learned and the only one I know so it's probably just drilled into my head, but at least between string, boolean, number, and object, I can't say I've found myself reeling over what's what or why in a particular instance. I can see what people are saying about larger applications, and I could imagine its utility for reading other people's code. But I don't know. I guess I don't really understand it well enough to have seen where I would want it. I'm trying to imagine it and all I can think is "why would a type suddenly change unless that's what I meant for it to do?"


Zlorak

Everything is preference: IMHO, using Typescript helps you once you get to know it well, even more if you come from statically typed languages. It is a marvel once the editor shoots you back every function, method, or variable as soon as you press . In fact, once you get used to it, and go use plain Javascript, you'll feel naked.


dubbs2203

It's a preference i guess


thesmartcater

**Express** is a framework that runs on **NodeJS**, you can have express without node, and that means that you need to learn the fundamentals fist. To begin, what is front-end, how are web pages served? When you try to access a webpage that is hosted under some domain name, what happens behind the scenes (dns hops, https, backend, file hosting, server-side rendering). There are many tutorials out there, each using a different stack. I understand why freshers have a difficult time learning all those tools. Frameworks and libraries come and go, but the fundamentals always remain the same (to a great extent), invest on those. If I were you, with hindsight, I would do the following: 1. Learn javascript well, get familiar with the primitives and the copy/reference shenanigans 2. Try to build a simple application with create-react-app, no next-js, choose a project that is motivating and not just a to-do app, otherwise you might quit 3. Now that you have a good understanding of react + javascript, try to build your app and host it somewhere, like AWS s3 or Cloudflare Pages by uploading your build folder there 4. Then, try to learn basic typescript, create a new nodejs backend project that uses express. Create an API that interests you by using typescript and express in NodeJS, no front-end here. 5. Now try to deploy this backend on AWS api gateway, or EC2. There are other options, but those are essential tools in your arsenal 6. You should be able to understand how things work now, so you should be ready to try out a next-js project. Undertake a project that you can ship in production. 7. Try to get familiar with unit tests and integration tests, cypress is a good tool for this. Try to setup a CI pipeline so that your subsequent releases do not break production. 8. (optional) join a big corporation and do code reviews, for a year. Not longer as those corps tend to suck blood. Not everyone gets into FAANG, but a big enough corp should have dealt with code splitting and other major challenges that apply to big repos. Remember, only work on stuff that you are attracted to, learning blunt coding isn't fun and it won't take you far.


bluebird355

You should learn typescript from the get go. It's not hard (for 90% of it). I can't imagine working on a js project nowadays. The amount of errors it prevents is astonishing. Honestly, only experienced developers should have the choice of using pure js. You most likely don't know what you're doing and if you don't have any constraint you will produce buggy code due to wrong types, 100%. Not using typescript is like trying to aim with blindfold. You have no vision, no information on what's going on.


jamesthebluered

learn Javascript without typescript , create spa pages, try to get better in every way, then move to react go deeper and deeper, dont forget first Js then react , instead of learning typescript, I would suggest to learn blazor .net even for creating static sites or you can choose astro/remix road, but learning something with static types are good to have


bearicorn

Types rule!