Hey I have a doubt.. which initial value ultimately gets set in the context.. the value you passed inside createContext(VALUE) or the value you passed as the initial value in reducer
He is too smooth, I just don't understand how does he not fall into any of them typescript pits like I do =) I almost regret my project uses typescript now..
Agree with the tricky parts and quite nasty pitfalls. Is it also the same when using TypeScript in Angular or just React? OOP in C# feels so natural and works like a breeze.
Getting errors in context.tsx: Binding element 'ReactNode' implicitly has an 'any' type. Cannot find name 'children'. ReactNode is defined but never used.
I'm using your code exactly and on line 29 getting a TypeScript error: Type '{ state: { count: number; }; dispatch: React.Dispatch; }' is not assignable to type 'undefined'.ts(2322). Any thoughts?
Hello, Graham sorry I was not able to reproduce the error, I'm guessing the file you're mentioning the error is the `context.tsx`, right? If that's so, I just uploaded my code to a Github public gist: gist.github.com/atilafassina/02f9826c473130b162bea5783373dfdd If that doesn't help, please let me know. I will upload the code from every video to a github repository ASAP, I just hadn't had time to set everything up just yet. Cheers!
Thanks for the feedback, Kosta :) I usually don't like skipping parts that affect the UI I'm showing. That's why I added the landmarks on the video description.
useContext starts around 8:45
Thank you so much! Keep it going!
Hey I have a doubt.. which initial value ultimately gets set in the context.. the value you passed inside createContext(VALUE) or the value you passed as the initial value in reducer
Parabéns pelo vídeo Atila. Ótimo conteúdo!
Valeu, Nick!!!
Tentando melhorar a cada vídeo! 🔥
He is too smooth, I just don't understand how does he not fall into any of them typescript pits like I do =) I almost regret my project uses typescript now..
Clear and easy-to-understand explanation. Very helpful. Thanks so much Atila. Please keep creating more such tutorial videos on React-Typescript.
Thanks a lot, Shakeel!! I'm very happy you're liking the videos.
Comments like yours are what gets me going! 💪
Is Typescript mainly geared towards larger applications? It seems like a lot of extra work to make this simple counting machine.
Show de bola Atila, está mandando ver no inglês também
Thanks alot for this great video. Need more videos on react with typescript
Kindly share the repo.
Continuing typescript series! pls!!! tks mano!
Agree with the tricky parts and quite nasty pitfalls. Is it also the same when using TypeScript in Angular or just React? OOP in C# feels so natural and works like a breeze.
Getting errors in context.tsx: Binding element 'ReactNode' implicitly has an 'any' type. Cannot find name 'children'. ReactNode is defined but never used.
meow! :) thanks with the wonderful tutorial
I'm using your code exactly and on line 29 getting a TypeScript error: Type '{ state: { count: number; }; dispatch: React.Dispatch; }' is not assignable to type 'undefined'.ts(2322). Any thoughts?
Hello, Graham
sorry I was not able to reproduce the error, I'm guessing the file you're mentioning the error is the `context.tsx`, right?
If that's so, I just uploaded my code to a Github public gist:
gist.github.com/atilafassina/02f9826c473130b162bea5783373dfdd
If that doesn't help, please let me know.
I will upload the code from every video to a github repository ASAP, I just hadn't had time to set everything up just yet.
Cheers!
You need to add the type of state and dispatch as :
`createContext(undefined);`
@@AyKayGod in an interface how would it be?
What is the color themes and font bro ?
Nice tutorial, but did I just hear gun shot @7:25
Excelent!!!
Why did it not ask for type for [children} while defining the context provider?
The glass at 9:36 :')
half of tutorial is css ....
Thanks for the feedback, Kosta :)
I usually don't like skipping parts that affect the UI I'm showing. That's why I added the landmarks on the video description.
half of all tutorials are css. Just skip it.