A subscriber sent me a junior react interview challenge, let's solve it

preview_player
Показать описание
00:00 - Introduction
01:23 - Building the Component and Passing Data
02:25 - Displaying Buttons for Each Country and Capital
03:51 - Randomizing the Array
05:11 - Setting Button Background Color to Blue
08:07 - Removing Buttons on Wrong Pair Selection
11:59 - Resetting Background Color and Buttons on Wrong Selection
16:45 - Checking if Game is Over
21:55 - Exporting the Component
26:33 - Refactoring and Code Cleanup
31:35 - Summary and Conclusion

Рекомендации по теме
Комментарии
Автор

This kind of raw unplanned video format was so great instead of a polished precoded solution so some newbies could follow along with your thought process step by step. The problem might have been very easy but the cleanup and optimization was a golden nugget. Awesome content as usual

wriddhihazra
Автор

As a beginner, this way of solving a problem is very insightful. I understood most of the logic even though I don't know TypeScript yet which made it slightly confusing at times. I'd love to see more videos like this. Thank you.

daanw
Автор

Love this live coding content! Also love that you explicitly made a point to talk a lot about re-factoring and writing clean code. Not nearly enough of that on YouTube videos!

alexjohnson-bassworship
Автор

Thank you for walking through the problem and the solution instead of providing scripted solution

Izzat-bjle
Автор

I am learning a lot from this video. I enjoyed following your thought process, its not only teaching us about js its also teaching us how to think. I think most of us are in tutorial hell because when we are given some task we dont know how to think to solve the task. Please do more of these and the refactoring videos.

መፅሃፍቶቻችን
Автор

It was a great challenge and I found it very interesting to do it and review your solution and explanation. Please more of these 😊

shakapaker
Автор

Thanks for these code challenges. I love feeling stupid not being able to do them and then learning about these foundational underlying concepts, keep them coming!

TedMosby-fkgj
Автор

this is like bob ross painting a barn overlooking a meadow. Nice. pls continue creating these types of videos. bob ross of junior level take home quizzes.thakns.

sltho
Автор

please more content like this... easier ones harder ones... as long as they are junior interview challenges. Thanks!

nasssty
Автор

I just completed this task before watching your solution.
Great challenge!

SASA-feco
Автор

Bruh lmao. There is no way in hell that a junior will know how to do this. I guess nowadays Junior means "has been making things with React for 5 years and finally landing his first interview".

ChadAV
Автор

Thanks for the walkthrough. I have been wanting to go back to react and it helped me revise a lot of things! :)

veselin
Автор

i got a challenge similar to you did few days ago (langchain story mode) btw great video.

Peacemaker.
Автор

I really enjoyed this and as others mentioned many times these live challenges are very valuable to see the full process of thinking and refactoring. Can you do a challenge please when instead of jumping straight into code spending some time with planning? Like what we need to implement, what kind of components, features, maybe packages, libraries. I really like React and TypeScript but am a total noob of planning a project.

I'm trying to do a project and I've done a fair bit of it and after a while it just gets messy with all the components and code.

bevik
Автор

Awesome content! One thing I would have done in a different way: in the getButtonClass you can either return option.state.toLowerCase() or use an object like {'SELECTED': 'selected', 'WRONG': 'wrong'} and then use option.state as the key like objectName[option.state] || '' (empty string if the key does not exist)

phaberest_
Автор

Great video bro learned a lot, I did a slightly different implementation, but the video really helped me in the overall idea

hannibalm
Автор

Thank you so much for sharing these kind of contents <3

coder
Автор

Could the button have been changed to a Checkbox? It functions like a checkbox.

somethingbeautiful
Автор

How are these coding interviews normally set nowadays? The last one I did was a few years ago and I was able to take it home and put the end result in a github repo for them to access. I couldn't imagine doing something like this live with people watching over me!

Jongo
Автор

@Web Dev Cody superb content...please keep on uploading more such Coding Challenge Videos on React..they are asked a lot during interviews.

RavindraSingh-lppl