Why you SHOULD be using TypeScript with React

Поділитися
Вставка
  • Опубліковано 3 сер 2024
  • In this video I go over 3 reasons why you should be typescript when creating a react application.
    Join our Discord: / discord
    🚀 Learn ReactJS By Building 6 Projects: codedamn.com/learn/reactjs-pr...
    🐙 GraphQL Course: codedamn.com/learn/graphql-fo...
    ► Buy Crypto on Coinbase: coinbase-consumer.sjv.io/PedroTech
    Social
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    Website: machadopedro.com
    Linkedin: / machadop1407
    Instagram: / _pedro.machado_
    Github: github.com/machadop1407
    Business Email: pedro@pedrotech.co
    TIMESTAMPS
    00:00 | Intro
    00:46 | TypeSafety
    04:31 | Better organization with TypeScript
    10:57 | Autocompletion with Typescript
    Tags:
    - ReactJS Tutorial
    - ReactJS and Typescript
    - NodeJS Tutorial
    - API Tutorial
    #reactjs #typescript
  • Наука та технологія

КОМЕНТАРІ • 119

  • @universecode1101
    @universecode1101 2 роки тому +5

    Yeah I see Typescript everywhere and it’s very important to learn it

    • @butterfly7562
      @butterfly7562 2 роки тому +2

      Universe Code, you're important, too. I see you on all the programming channels 😀

    • @universecode1101
      @universecode1101 2 роки тому +1

      @@butterfly7562 Thanks ... I try to keep up to date by looking at what my colleagues are proposing. Pedro is very good

    • @PedroTechnologies
      @PedroTechnologies  2 роки тому +1

      I see you everywhere too hahahaha thank you for the support!

  • @antoniobasilio319
    @antoniobasilio319 2 роки тому +6

    You have the channel that helps me the most BY FAR. Thank you so much for your videos! Congratz!

  • @primetime645
    @primetime645 2 роки тому +6

    I always hated Typescript because I never knew about Interfaces. This was pretty helpful to say the least.

    • @asaventurasderobson
      @asaventurasderobson 2 роки тому

      I have that problem, except the first project I took was full of that, so I manage to learn quickly. But I still struggle with Typescript sometimes. Is like struggling with JavaScript, except double the complexity, but half the code 😂😂😂

  • @TheZarique
    @TheZarique 2 роки тому +8

    Valeu Pedro. Sempre venho aprender no seu canal, e vc sempre trás conteúdos realmente importantes pra quem está aprendendo

  • @omarandresramirezrodriguez1640
    @omarandresramirezrodriguez1640 2 роки тому +38

    could you make a project using typescript in backend and frontend? ...it'd be great...thanks for your videos

    • @PedroTechnologies
      @PedroTechnologies  2 роки тому +22

      Yes!

    • @Trzimajewski
      @Trzimajewski 2 роки тому +7

      @@PedroTechnologies I'd like to see some Next + Prisma stuff (full stack, sure)

    • @yuxianxu806
      @yuxianxu806 Рік тому

      @@Trzimajewski RedwoodJS integrates you mentioned.

  • @asaventurasderobson
    @asaventurasderobson 2 роки тому +2

    Great. I have been struggling with some of this concepts.

  • @gorkavillar8568
    @gorkavillar8568 2 роки тому

    Great video Pedro, thanks! I personally can't imagine a project without Typescript, especially if you're working solo 🙌🏼

  • @ramasabajo5360
    @ramasabajo5360 10 місяців тому

    Thanx for convincing me to start learning Typescript to use with my React apps. I don't like the boilerplate code, but the effort all makes sense to me now.

  • @skl949
    @skl949 2 роки тому +5

    bro i love your videos i like every single one! keep doing this i know you will be the next web dev simplified

    • @PedroTechnologies
      @PedroTechnologies  2 роки тому +5

      I love WDS videos, that would be awesome lmaoo Thank you!

    • @songokussj4cz
      @songokussj4cz 2 роки тому +1

      @@PedroTechnologies You're much more helpful than WDS :-) Better examples, you explain edge cases, multiple possibilities, etc... Much better :-)

  • @elvissam1401
    @elvissam1401 2 роки тому +1

    :D keep up the good content Pedro, blessing for you!

  • @hardwired89
    @hardwired89 2 роки тому

    Yeaaa react typescript tutorial 😍

  • @Trzimajewski
    @Trzimajewski 2 роки тому +2

    IMO with the camera the videos just have a different approach, and I loved it, man, keep up the good work

    • @PedroTechnologies
      @PedroTechnologies  2 роки тому

      Thank you! I've been saving money to buy this camera and I finally did it :)

  • @nilankoor
    @nilankoor 2 роки тому +1

    Great video as always. And yeah, love the camera setup. Keep making more videos with the facecam.

    • @PedroTechnologies
      @PedroTechnologies  2 роки тому

      Thank you!!!

    • @nilankoor
      @nilankoor 2 роки тому

      Looking forward to more TypeScript videos as I want to start learning TS.

  • @k303k
    @k303k 9 місяців тому

    You convinced me to learn TypeScript deeeply .Thanks a lot Pedro

  • @mabrarhassan
    @mabrarhassan Рік тому

    Appreciate it.
    Pretty cool and useful lesson.

  • @iUmerFarooq
    @iUmerFarooq 2 роки тому

    Wow Man, you look cool.
    Very helpful tutorial Pedro. Want to see more on React + TypeScirpt.
    Great effort ;)

  • @danielkamau8436
    @danielkamau8436 Рік тому +4

    Nice work Pedro. I love the teaching you give me. With your face on is nice, this makes you feel connected to your niche, also I think in away it cements concentration of the people watching and following.

    • @PedroTechnologies
      @PedroTechnologies  Рік тому

      Next video has my face on again :)

    • @danielkamau8436
      @danielkamau8436 Рік тому

      @@PedroTechnologies yeah sure, am your student and I can confirm that.(your bro from Kenya, come and code one day from here, I will cater for all bills, I learn a lot from you)

  • @AstraSlade
    @AstraSlade 2 роки тому

    Nice vídeo pedrin, salve do Brasil sempre acompanho teus vídeos :))

  • @longnhat6405
    @longnhat6405 Рік тому +1

    very well deliveried video

  • @faizanahmed9304
    @faizanahmed9304 2 роки тому +2

    Thank you Pedro

  • @RogerThat902
    @RogerThat902 2 роки тому +1

    Very good explanation

  • @tesla1772
    @tesla1772 2 роки тому +5

    Can you plz create an series of complete react typescript project including state management and all

  • @MOHAMED-AMINE-CHEKROUNI
    @MOHAMED-AMINE-CHEKROUNI Рік тому

    I learn a lot from you, Thanks

  • @common_era_being
    @common_era_being 2 роки тому

    You are super bro... keep it up 💯

  • @SkyrimBeast
    @SkyrimBeast Рік тому +1

    Why I SHOULD be using TypeScript with React?
    Because Pedro told me so and that's good enough for me

  • @eliuddyn
    @eliuddyn 2 роки тому

    Great content Brother 🔥🔥

  • @bongkotsaelo4239
    @bongkotsaelo4239 Рік тому

    Thanks, you say it out very clear. The code more looks like java, which is messy. After watching this video, I think I'm in!

  • @shinigamiryuk786
    @shinigamiryuk786 2 роки тому

    Great video😊

  • @learnmakeit9315
    @learnmakeit9315 2 роки тому +1

    Thanks! I must learn typescript

  • @Hacking-NASSA-with-HTML
    @Hacking-NASSA-with-HTML Рік тому +2

    Amazing awesome so cool 😎 content 👍♥️

  • @mahinchowdhury3995
    @mahinchowdhury3995 Рік тому +1

    Good stuff.

  • @vantung2210
    @vantung2210 2 роки тому

    Thanks for your video

  • @The_Awakened_Hybrid
    @The_Awakened_Hybrid Рік тому

    AWESOME tutorial! Obrigado bro!

  • @adityaj21
    @adityaj21 2 роки тому +1

    awesome video

  • @thalia.c
    @thalia.c 2 роки тому +1

    brabo demais 🔥

  • @kevinolive
    @kevinolive Рік тому

    well, you've convinced me to learn TypeScript. Fits better with the languages I know better than JavaScript.

  • @tegaogheneovo5881
    @tegaogheneovo5881 2 роки тому +1

    hey pidro , gang gang you look diffy, sensei

  • @randerins
    @randerins 2 роки тому

    "cuntry" cracked me up 😅

  • @pb8655
    @pb8655 2 роки тому +2

    Any change you can make an advanced typescript video. The basics are easy to grasp but. I see syntax like “function all the time and I don’t get the angle brackets at all.

    • @norejudeisa
      @norejudeisa 2 роки тому

      I think that's generic type, I do dart and I think it's similar to typescript type system

    • @PedroTechnologies
      @PedroTechnologies  2 роки тому

      There aren't a lot of advanced typescript. I can make a full typescript tutorial for sure, but there aren't a lot to learn if u already know js

    • @pb8655
      @pb8655 2 роки тому

      @@PedroTechnologies maybe a small project with react-typescript-redux? i know its a weirdly specific request but I was watching one of the react/redux authors do a code along ua-cam.com/video/9zySeP5vH9c/v-deo.html and there are alot of built in types and hooks that i don't quite understand

    • @pb8655
      @pb8655 2 роки тому

      @@norejudeisa yea you're right!

  • @abhishekmishra9841
    @abhishekmishra9841 2 роки тому

    Nice ty u

  • @alasassi960
    @alasassi960 2 роки тому

    can you make video what should you know before getting a first job with no experience thanks

  • @feeltrig8822
    @feeltrig8822 2 роки тому

    could you make a video on using formik yup for form validation with checkboxes, radio buttons cause there aren't much good videos on it and most of react forms aren't having those fields.

  • @ajitshaw1936
    @ajitshaw1936 2 роки тому

    Bro Can you make a video on Middleware with redux js. Keep Up the good Work 😍

  • @westernpigeon
    @westernpigeon 2 роки тому

    i know i’m late to the vid, but i would love if you could make a video on how to use the Stripe API

  • @mirkosedda3196
    @mirkosedda3196 2 роки тому +1

    U can use the ? yourself in react when accessing object and the app will not break if one of the values is null 😊

    • @NicoRTM
      @NicoRTM 2 роки тому

      Yup, and Typescript will remind you to use it when a value can be null

  • @TheDorac1
    @TheDorac1 2 роки тому +5

    I like typescript but when using some 3rd party npm packages, some aren't typescript ready, causing issues and I can't find a way to bypass it.

    • @waleedsharif618
      @waleedsharif618 2 роки тому +1

      This !

    • @PedroTechnologies
      @PedroTechnologies  2 роки тому +4

      I understand your point, and it makes sense for a personal project or anything that won't be used by other people. But you shouldn't be using a 3rd party npm package if they don't support typescript in my opinion

    • @LoneWolf-ll8kb
      @LoneWolf-ll8kb 2 роки тому

      @@PedroTechnologies perhaps this should be in the title

  • @stackoverflowlurker3057
    @stackoverflowlurker3057 2 роки тому +1

    Which color theme are you using? Also, what is the difference between type and interface? Been googling for a while and can't find the answer :(

    • @PedroTechnologies
      @PedroTechnologies  2 роки тому +1

      I think my color theme is electron but im not sure cause im not with my computer rn hahaha Types and interfaces are very similar nowadays since you can describe an object with a type. I generally use types when i want to describe a single variable that cab have two different types, for example: type Age = number | string; Interfaces are better for describing objects!

  • @johnadepelumi93
    @johnadepelumi93 2 роки тому

    Nice camera Pedro. Would love to connect with you on Twitter if you don't mind. Great tutorials, I've learned a lot from the tips you share from time to time.

  • @redaelouahabi731
    @redaelouahabi731 2 роки тому

    the safety option (?.) exists also in JS 😉
    thanks 4 the video

    • @PedroTechnologies
      @PedroTechnologies  2 роки тому

      Glad you liked it! Yeah, i meant more that with typescript it will let you know if you need ?. in a possibly null object when in JS it doesn't

  • @orarbel167
    @orarbel167 2 роки тому +2

    does it matter if the file extention is .ts or .tsx ? and thank you for the great video

    • @chirilcugureanu1853
      @chirilcugureanu1853 2 роки тому +1

      Nah, it's mainly just a personal preference

    • @blackbones425
      @blackbones425 2 роки тому

      .ts => pure typescript.
      .tsx => file with JSX

    • @malamhari_
      @malamhari_ 2 роки тому

      If you use JSX in .ts files TypeScript will yell at you

  • @Randomguy48279xyz
    @Randomguy48279xyz 2 роки тому

    👍

  • @slingyy
    @slingyy 2 роки тому

    que canal bom 🤠

  • @friendlyapk
    @friendlyapk 2 роки тому +1

    You look nice today handsome guy!

  • @aditithakur1862
    @aditithakur1862 Рік тому

    I have learned React with Javascript and all it’s functionality with core JS.
    Will it be difficult to now switch it to Typescript? And what in general changes in React with TS compared to React with JS

    • @PanosPitsi
      @PanosPitsi Рік тому

      its the same but with types it actually makes you way faster

  • @FaisalAmin001
    @FaisalAmin001 2 роки тому

    Please start NEXT.js or Backend
    Thanks a lot 🙌

  • @ArisAris-fs1ip
    @ArisAris-fs1ip 2 роки тому

    Good afternoon, Please give me your help! S O S
    So im starting my pizza restaurant website for my portfolio, with full e-commerce features. The question is this:
    The owners admin dashboard, where he receives the food orders and editing , putting or delete products,
    and the customer's interface, where he enters and orders food, send order and pay.

  • @4444-c4s
    @4444-c4s Рік тому

    8:45 imp pt.

  • @victorvondoom2350
    @victorvondoom2350 2 роки тому +1

    so are you saying never to use pure javascript with reactjs ?!

    • @PedroTechnologies
      @PedroTechnologies  2 роки тому

      I do hahaha but only in my videos because it makes sense cause not everyone knows ts. But no matter what i decide to build outside of youtube projects, i will always use typescript!

  • @codefingers8957
    @codefingers8957 2 роки тому +2

    i am your 647th view 92nd like and 17th comment =)

  • @dylangonzales
    @dylangonzales 2 роки тому +1

    Why you DON’T NEED typescript: ua-cam.com/video/QVkPCb7MduY/v-deo.html

  • @kabagambedaniel2468
    @kabagambedaniel2468 2 роки тому

    let me learn typescript

  • @fabianofrank4785
    @fabianofrank4785 2 роки тому

    Are you Brazilian?

  • @markopolo2224
    @markopolo2224 2 роки тому

    you look like sennyk4

  • @munashe_dev
    @munashe_dev 2 роки тому +1

    Typescript fronted , golang backend === 🚨

  • @BlobBlobkins
    @BlobBlobkins 2 роки тому

    If you need typescript with React, then you are coding wrong. There are porpTypes and other tools out of the box.

  • @Pareshbpatel
    @Pareshbpatel Рік тому

    A great video that introduces us to using Typescript with React. Thanks, Pedro
    {2022-11-13}

  • @sc0or
    @sc0or 2 роки тому +1

    This is not absolutely necessary. I type fast enough and do not need in additional training. Data must be simple. Simple data does not need types. When you start to create monstrous generics, you can throw your code in a trash can away. I mean it.
    React means strings, numbers and handlers (with strings and numbers) in parameters. All other more complex things must be incapsulated in your code, and to create types for them just for yourself looks like a "mental disordering" -)
    PS When you pass objects, that means a not enough decomposition.

    • @PedroTechnologies
      @PedroTechnologies  2 роки тому

      React also means objects and complex data types. How are you going to create an application without guaranteeing that ur handling ur data correctly? I get your point, but I feel like we always think we are able to perfectly write typesafe code when in reality it doesn't matter how long we have been coding for cause we will make mistakes. Using typescript in my opinion is being respectful towards your users and recognizing that not everyone is perfect. I love this debate hahaha thank you for giving ur opinion on this! I plan on making more opinionated videos like this cause it helps us all learn from each other, even if we disagree :)

    • @sc0or
      @sc0or 2 роки тому

      @@PedroTechnologies I used to use f... Angular for 5 years, then TS/React for 3 years on a big project, and then - 3 years of a pure JS/React on 4 about simultaneous projects. There was no a day I regretted. I breath now. Team sizes are about the same. May be because we don't use redux anymore... =)

  • @AlesaGillespie
    @AlesaGillespie 2 роки тому

    TypeScript meio que vai ser o padrão futuramente. Mas eu não vejo, sinceramente, motivo pra isso existir. Primeiro que, eu escolhi estudar uma linguagem não estatica e agora o mercado quer enfiar esta bosta de tipagem em um conceito que, de inicio, era pra ser ''dynamically typed". Mó chato ficar declarando interfaces.
    Só complicam a vida no frontend com essas pohas. Sou a favor do exterminio do TypeScript e o PyScript.

  • @alexdefaro
    @alexdefaro 2 роки тому

    Nah... Still not convinced brother 😁

  • @Pareshbpatel
    @Pareshbpatel Рік тому

    {2023-04-13}

  • @user-hg8bo3em5y
    @user-hg8bo3em5y 2 роки тому

    Fuck TypeScript all my homies use Test Driven Development

  • @anselmoribeiro8138
    @anselmoribeiro8138 2 роки тому +1

    In my opinion Typescript apps needs to much work. So it sucks

    • @Jakub-Putaj
      @Jakub-Putaj 2 роки тому

      so basicly it deepends on project, i'm honestly thinks that force to use typescript in every project is not the best way to create apps because not every app need to have typescript

    • @PedroTechnologies
      @PedroTechnologies  2 роки тому +1

      It takes a lot of work in the beginning, but when you get good at it you will write everything super fast. The benefit outweighs the cost for sure!

    • @Jakub-Putaj
      @Jakub-Putaj 2 роки тому

      @@PedroTechnologies i understand but for the projects like landing Pages with animation lib typescript is not a necessary tool

    • @anselmoribeiro8138
      @anselmoribeiro8138 2 роки тому

      @@PedroTechnologies Thanks for your effort and I think you should continue to publish videos like this. I don't like typescript, but maybe I'll change my mind in the near fututre.

  • @mohamedshames2432
    @mohamedshames2432 2 роки тому

    شكرا يحب

  • @MohammedAlziko
    @MohammedAlziko 5 місяців тому

    😘😘😘😘

  • @antonyefanov
    @antonyefanov Рік тому

    amazing video

  • @alasassi960
    @alasassi960 2 роки тому +1

    can you make video what should you know before getting a first job with no experience thanks