Tahnk you so much bro, this is the best solution i found and you explain really well! hope you upload more content like this.
@ASoftwareEngineer
2 жыл бұрын
you are welcome! will upload cool videos like this soon.
@onlydev4099
Жыл бұрын
nice one. I try to adapt this reactjs code to angular Thank you
@ASoftwareEngineer
Жыл бұрын
thanks. absolutely! practicing your craft gets us to mastery level. good luck and i appreciate the comment always 👊
@Jhonyhndz
2 жыл бұрын
Excelente. Me encanta la manera como lo resuelves.
@ASoftwareEngineer
2 жыл бұрын
Gracias. Me alegro de que este vídeo te resulte útil.
@bitroix_
Жыл бұрын
This is great thank you for uploading
@ASoftwareEngineer
Жыл бұрын
certainly. I am in the process of creating another ReactJS video that you might interesting.
@DanZdan99
11 ай бұрын
Hello sir, can you show how to make the "x" and "o" text changing color when clicked? I already try to do some edit in square and board component but I'm still confuse. Btw, nice tutorial sir
@ASoftwareEngineer
11 ай бұрын
yes, it is possible. I update the Square component to add additional class where if it is clicked, i will add a class called `square--active`. That will set the background-color to something we desire. Lastly, is to add a css rule to `square--active`. You can see my implementation below. codepen.io/angelo_jin/pen/wvNaQPw
@ASoftwareEngineer
2 жыл бұрын
Next recommended video: ReactJS: 3 Ways to Pass Data Between Components (kzitem.info/news/bejne/xmiFsoaag32feJw)
@oyatsukikagami1960
Жыл бұрын
you did all the componenets in the same file, but how do you use the click function when you use a separated files ?
@ASoftwareEngineer
Жыл бұрын
you can create a function and pass that as a prop that a component can invoke. please let me know if that make sense. i cover this in one of my video
@camo4970
Жыл бұрын
how do you implement a 'draw' functionality?
@ASoftwareEngineer
Жыл бұрын
there is no draw functionality but turn functionality where each player swap turns from X to O and O to X. Is this what you mean?
@camo4970
Жыл бұрын
@@ASoftwareEngineer no, i mean when the game is over and nobody wins, how do you display it on the screen that there is a draw?
@ASoftwareEngineer
Жыл бұрын
@@camo4970 oh i see, wasn't able to cover this edge case. An idea is to introduce another state that will track the number of turns. If the turn is 9th time and there is no winner then it is a draw. let me know if this make sense
@camo4970
Жыл бұрын
@@ASoftwareEngineer oh thats a good idea, i will try that . Thanks
@ASoftwareEngineer
Жыл бұрын
of course! 💪🤙🏻
@Jutsued
2 жыл бұрын
Nice man. I will try to re-create this game. I'm learning bit by bit and this is a good project to cement some react concepts. Well done.
@ASoftwareEngineer
2 жыл бұрын
definitely. i got asked to create this game on my interview and got the job with great comp because of it. you can use my codepen exercise to save you some time as i added react libs and style in there already so you can concentrate on the logic. when you are very confident feel free to do everything on your own. good luck!
@LaFragas
2 жыл бұрын
great visual intro, preface, and short fast explanation. well done. love it!
@ASoftwareEngineer
2 жыл бұрын
thank you for dropping a comment, really appreciate it! i always strive to make my videos direct to the point while doing it fast so audience will get what they came from.
@antonio6620
2 жыл бұрын
Sorry your post on LinkedIn from React Jobs page. Nice video!
@ASoftwareEngineer
2 жыл бұрын
thank you Antonio! I’m planning on creating more valuable content like this one.
@felipepacheco.developer
2 жыл бұрын
Good video bro! Upload more videos
@ASoftwareEngineer
2 жыл бұрын
thank you Felipe! You got it, will upload more soon. 👊👌
@fallenIights
2 жыл бұрын
Thanks for the tutorial! BTW in React, it is better to treat the first argument given by useState as immutable. Therefore I would replace handleClick to: const handleClick = (i) => { const updatedSquares = [...squares]; updatedSquares[i] = isX ? "O" : "X"; setSquares(updatedSquares); setX((p) => !p); };
@ASoftwareEngineer
2 жыл бұрын
it is a good idea always to treat arguments as immutable in general - react or vanilla js especially if arguments are being used by other parts of app. for this example, it is only one place and is being updated by the setSquares so i figured make this tuts as simple as possible.
@fallenIights
2 жыл бұрын
@@ASoftwareEngineer clear, tnx
@ASoftwareEngineer
2 жыл бұрын
@@fallenIights of course, welcome
@lidstech54
2 жыл бұрын
Thank a lot for this one! It really helped me understanding.
@ASoftwareEngineer
2 жыл бұрын
my pleasure Lidia!
@DastageerHC-b5q
9 ай бұрын
you areby far the the best web dev tutorial channel i have every come across.
@ASoftwareEngineer
9 ай бұрын
thanks for the sweetest comment ever! :)
@DastageerHC
9 ай бұрын
Hey Just An Update I was preparing for an interview that day, and surprisingly the same question was asked, your animations and explainaions made it very easy to understand, and thanks to you i cleared that round. Keep up the good work.
@ASoftwareEngineer
9 ай бұрын
@@DastageerHC congrats! I am happy to hear that my effort producing this video is fruitful to you. Please let me know if you get the role. Good luck.
@babylikescoffee
2 жыл бұрын
Thanks for this!! Awesome video 💯🔥
@ASoftwareEngineer
2 жыл бұрын
my pleasure! expect more videos like this soon.
@franku.n.1798
Жыл бұрын
You are awesome bro. thank you.
@ASoftwareEngineer
Жыл бұрын
thank you for the kind words and the feedback. this channel could use them. 🎊🎉
Пікірлер: 45