Комментарии:
I'm not sure if this is only available currently, but the next JS cli command comes with the option "--typescript // --ts" that installs all the packages, so one has only use
" yarn create next-app --typescript " OR " yarn create next-app --ts "
When doing npm run dev on terminal it shows this problem "It looks like you're trying to use TypeScript but do not have the required package(s) installed.", I installed the said package using this npm install --save-dev @types/react which is they provided, however it repeats the problem and outputs the same problem and same package needs to be installed, seems like a loop. How to get pass through it? Thank you
ОтветитьI don't understand how at the 3min mark in your video, you have your useEffect rerendering with an empty dependency array. It should only update the page once right? Cause it's only working for me when I delete the array. It's been a while so maybe I don't remember useEffect properly. I copied your example, letter by letter, and it doesn't work for me.
ОтветитьGreat tips Basarat, thank you!
ОтветитьMore Next.TS stuff
Ответитьdo u know how to do env profiling in nextjs... like accessing different api host by setting different process.env.NODE_ENV in nextjs ? sit, uat n prod
ОтветитьMy typescript skill increased significantly since I started watching you keep doing what you do ♥️.
ОтветитьPlease add more typescript nextjs
Ответить