Great video but a lot of this is confusing to me. In the first case where there's no useEffect I couldn't understand why the useMemo in the context did the trick. After all, if the button is pressed then a new object should be generated despite the useMemo because the state has changed and the useMemo dependency array has this element. Yet, the Laser component didn't re-render. Any idea about the reason?
Hej Thomas, lärorik video, har du någon video som du går genom lite djupt på hur man skickar State mellan olika component på en nested state data i ReactJS och TypeScript?
Hej ... hmmm .. vet inte riktigt hur du menar. State skickar man aldrig utan man skickar data via props till komponenterna. Annars är det context man kör med och då kan man accessa statet vartsomhelst i appen.
@@Weibenfalk Jo jag vet, det jag vill göra är, jag har tre comp, Home.tsx där jag fetchar en lokal nested json fil sedan definierar interfaces för dessa nested data, efter jag gör map på datan och skickat en del över till GameList.tsx, samtidigt skickar jag en del av state över till Search.tsx som filtrering på game titel sker, sedan vill jag sätta den filtrerade data på State och skickar tillbaka till Home.tsx som är Parent comp, men jag får en Typescript error mer specifikt STATE
Wow! You nailed it. Great tutorial. I liked it. Saved it. Subscribed to the channel.
Clean to the point explanation, thank you for helping me visualise the data changes so clearly, great tutorial!
Very important video. I was looking for context with tsx
And with 30 minutes of my time I now have a context wrapped around my tricky filter UI and wiped out half the JS in that component. Many thanks.
wonderful!
Amazing example ! Thanks very much ! I have implement this to my context and it work nicely!
19:05 with cmd + D it's faster to achieve) Thank you for lesson
Man you helped me very much!Thanks
Мужик! Ты лучший!
u answered all my questions!
finally found a clear video
how do you mock this hook for jest testing?
thanks for the video, very usefull !
Great video but a lot of this is confusing to me.
In the first case where there's no useEffect I couldn't understand why the useMemo in the context did the trick. After all, if the button is pressed then a new object should be generated despite the useMemo because the state has changed and the useMemo dependency array has this element.
Yet, the Laser component didn't re-render. Any idea about the reason?
It’s the first context that changes value. Not the second one. That’s why it’s the same object when it’s memoized
@@Weibenfalk oh man, how did I miss that!
Hej Thomas, lärorik video, har du någon video som du går genom lite djupt på hur man skickar State mellan olika component på en nested state data i ReactJS och TypeScript?
Hej ... hmmm .. vet inte riktigt hur du menar. State skickar man aldrig utan man skickar data via props till komponenterna. Annars är det context man kör med och då kan man accessa statet vartsomhelst i appen.
@@Weibenfalk Jo jag vet, det jag vill göra är, jag har tre comp, Home.tsx där jag fetchar en lokal nested json fil sedan definierar interfaces för dessa nested data, efter jag gör map på datan och skickat en del över till GameList.tsx, samtidigt skickar jag en del av state över till Search.tsx som filtrering på game titel sker, sedan vill jag sätta den filtrerade data på State och skickar tillbaka till Home.tsx som är Parent comp, men jag får en Typescript error mer specifikt STATE