sysbender / ts-dave

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ts-dave

ts01

tsc -w

tsconfig.json

  • root
  • outdir
  • include
  • target
  • noEmitOnError

ts11

https://github.com/gitdagray/typescript-course/blob/main/lesson11/index.html

npm create vite@latest npm i

ts react basic

npm create vite@latest react-ts-basics replace src and public npm install npm run dev

  1. add CourseGoalProps type - title, description
  2. use deconstruct
  3. convert description to children prop
  4. use propsWithChildren type
  5. use arrow function to define component -
    1. FC type is generic ,
    2. type FC T is used for props type

use state

  1. add button with event to add goal ,
  2. add useState for goals
  3. add goals in unordered list

About

License:MIT License


Languages

Language:TypeScript 67.2%Language:CSS 11.9%Language:JavaScript 10.7%Language:HTML 10.3%