Lets Upgrade React's Official TicTacToe Game with Hooks & Typescript!

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024

Комментарии • 9

  • @AngleCoding
    @AngleCoding  4 года назад

    check out the finished project here! github.com/angle943/react-tictactoe-hooks-typescript

  • @marekchojecki4746
    @marekchojecki4746 4 года назад +2

    Awsome work with docs update. Thanks

  • @khotambakhromov
    @khotambakhromov 4 года назад

    Thank you so much. Keep it up bro
    Your channel is one of the best among JS channels

  • @anthoniG
    @anthoniG 4 года назад

    Nice, well done. Good explanations, speaking manner and overall tutorship. Keep it up.

  • @miklosnemeth8566
    @miklosnemeth8566 4 года назад

    Excellent demonstration of how the original primitive messy code was converted to a professional level typed version with TypeScript. At 31:07 however TypeScript didn't detect that you are referencing an undeclared function variable. Can you force TypeScript to detect this type of error? The other issue is that at 28:37 in line 102 TypeScript is not complaining that you haven't defined type for the status variable. Can you force TypeScript to detect these cases, too? Otherwise, brilliant tutorial, I've subscribed.

    • @AngleCoding
      @AngleCoding  4 года назад +1

      Thanks for your kind words!
      I've been doing some digging into your questions. Btw full transparency, I'm not an expert on all the ESLint rules nor the settings you can configure for TS, so take my answers with a grain of salt!
      for the 'Referencing an Undeclared function', it appears that there are some edge cases that prevents TS from detecting that. Check out this link here: github.com/microsoft/TypeScript/issues/13320
      For TS not complaining about the untyped status variable, that appears to be a feature(?) of Typescript. You can read about that here: github.com/microsoft/TypeScript/pull/11263
      You may be able to configure your ESLint/TS settings to warn you for these, however. Let me know if you find some rules you can apply to disable these!

    • @miklosnemeth8566
      @miklosnemeth8566 4 года назад

      @@AngleCoding It's all right TypeScript has its limitations as for type enforcement consistency. I found no ways either to make TS detect the untyped let, really weird. Anyhow, excellent video, thank you for the inspiration. I went further and made this app a PWA, since it is a brilliant example for an off-line operable mobile-deployable application.

  • @arhabersham
    @arhabersham 4 года назад

    Where is the project?