Learn Blackjack Video Source & Info:
In this video, I review React code in the form of an awesome looking blackjack game!
Learn Build Teach – https://www.learnbuildteach.com/
Request a code, design, or review review! – https://peerreviews.dev/
Want to learn everything you need to know about Visual Studio Code? Check out Learn Visual Studio Code!
Coupon – https://www.udemy.com/learn-visual-studio-code/?couponCode=LEARNVSCODE10
Build a Quiz App with HTML, CSS, and JavaScript – https://www.udemy.com/build-a-quiz-app-with-html-css-and-javascript/
Facebook – http://facebook.com/jamesqquick
Twitter – https://www.twitter.com/jamesqquick
Instagram – https://www.instagram.com/jamesqquick
Source: YouTube
What a great episode. Immediate impression is that I love those animations! Gives the game a really fun and professional feel. I have a particular love for blackjack as I have used either blackjack or video poker as my first serious project for languages I have learned over the years. You end up using a large portion of the language and it requires some serious logic. Great job, JC! And great job, James. As a former programming instructor, I know how hard it is to look at reasonably complex code and figure out what it is doing, what it is supposed to do, and how to improve it.
I look forward to more of these.
btw, here is what I use for a deepCopy of props and state to prevent accidentally mutating state directly:
const objCopy = obj => JSON.parse(JSON.stringify(obj));
I googled and found several answers. I like this one because it is so straightforward and it covers all arrays/objects no matter how many levels it goes.
And, yes, I created a bug in my first react projects by not making a deep copy. What was happening is that I accidentally changed my state object. Then, I ran setState. Because the state had already been changed, setState did not see any changes to the data and, as a result, did not re-render a presentation component that was dependent on the data. That was fun to debug.
Thank you Mr. Quick for the code review. I am excited about making the changes that you have recommended and learning from the experience. The advice you have been giving during this code review series is invaluable.