React.JS Live Coding Challenge | Problem Solving with Turing
HTML-код
- Опубликовано: 10 фев 2025
- The fifth episode of "Problem Solving with Turing" takes a look at Turing's Live Coding Challenge. It helps React.JS developers understand the kind of problems they must look at before sitting for the technical interview and test. Join the live to ace coding challenges and crack technical interviews with ease.
Become a Turing software developer today.
Take the Turing test now: turing.com/s/Ml...
Find remote US software jobs: turing.com/s/Rw...
Hire software developers of Silicon Valley caliber: turing.com/s/WS...
Watch more Turing.com reviews: turing.com/MVWqQr
Usually, I don't understand anything spoken in English in movies, but I understood everything the Turing guy was saying. Cool!
we want more such videos. its helping us a lot
So glad to hear this! :)
Amazing video ! It reinforces what I already know but I also learned quite some stuff. New subscriber here
Why there is much hate in this comment section, I mean he can be working with another js library and forget about the syntax. And maybe he got a coldfeet during the interview, this is a live stream interview and a lot of people watching. I didnt know about others but i myself is really am an introvert. Its really hard to code when people sees me. Or during the live stream. It feels like joining a dungeon during a raid boss and got a debuff to lower intelligent by 30-40% from the boss aura😂
By the way i intend to join as a mid level developer, wish me luck😂
Some people like to spread negativity and some are just straight shooters. Second kind of people are rare and won't put down others. First kind of people do this to feel better about themselves.
The solution is pretty good although when updating users he could have added the new users array to the previous users state like this
*updateUsers(prevExistingUsers => [...prevExistingUsers, { name: `${first} ${last}`, picture: thumbnail }]);*
so the array will be updated along with the old elements. Another thing he could have tried is to only fetch when the currentIndex gets changed. That way the array will only extend when he press "next" button. Finally if we clean up the next and previous function using previous index:
const handlePrevious = () => {
setCurrentIndex(prevIndex => Math.max(prevIndex - 1, 0));
}
const handleNext = () => {
setCurrentIndex(prevIndex => Math.min(prevIndex + 1, existingUsers.length - 1));
}
easy way to reduce the complexity of the code.
Pretty good? his solution is a disaster
can we google during the interview? Let's say, in case we need to build a regex pattern, or to implement a JS reducer. Many people won't remember the syntax, which is fair
No they don't allow that.
Competition is tough and knowing the stuff without Googling does speed up the work process. So I guess they don't allow this because they want to know how much work can we do without searching for syntax.
@@hammadahmad100 In reality, utilizing pre-existing templates from "Google" tends to be more efficient. Proficiency in online research is an essential skill that is often overlooked, yet proves to be highly valuable.
There's pretty much no difference between Interface and Type, decide with your team what's your preference and stick to it, be consistent. Although the only difference that does come to mind is Discriminated Unions which can only be implemented using Type if I'm not mistaken.
I wonder why he didn't use const when declare useState
Any challenge for PHP Developers with Laravel Framework ?
now i am in a good mood
yay! :)
Yeah bro. I was scared to take the test
kaya yan!
I tried React test at Turing page, but it is about old React, I do not understand this
Hi @richardramirez5746 😃
Please write to us at support@turing.com
Our team will help you out on priority!
Regards,
Turing
Amazing content guys, this was for a senior position right? Can you do one for a mid-level position? Thanks!
Thank you for your feedback, @emanuelacosta2541!
We'll note this and be sure to include this in our future videos.
Please subscribe to the channel, so you get notified of more such videos! 😄
This war nearly two years ago now, so we wouldn't do it this way today I feel. In Next.js, what I did in a project is I loaded the entire list in a server component, then I passed the list to a client component. In the client component I divised the list in smaller equal lists thanks to Lodash. And then I put the list in a useState that I would change to the next position by clicking Next and the previous by clicking Previous, making sure that the previous button is disabled if the position is 0 and the next button is disabled if the position equal list.length.
Now if the list was too big I would limit and offset my fetches, but in this case I don't think it would be necessary to fetch again and again at each click of the button. Fetching the whole list once may be slower, but then clicking on Next and Previous is instantaneous and doesn't require any loading.
Question: Why a interface not a type
Possible Answer: Because we can extend the interface, in future if we have to create a new user type (IAdminUser) whuch has same properties as IUser and some extra properties then we can extend IUser and create a new interface
types can be extended. like type t1 = {} & t2
It doesn't matter, interfaces and types are pretty much the same thing
@@zCrazyHero I use an interface for objects basically.
@@alwaisy me too, I prefer to use type in parameters or consts
Index is exceeded so user is not found with that index..
interface extends to another interface
so the Turing test is taken live like that ??
Hey @abdulmuhaminrehman7530 ,
This video is a helpful representation of how the coding challenge can be tackled/solved.
Developers are not required to take the coding challenge during an interview, or while conversing with the recruiter.
However, your coding challenge screen will be recorded once you start the process, this just ensures that recruiters can assess your expertise in real time.
Cheers!
-Turing
Anyone please explain me the currentIndex logic I didn't get what he did...???
He is maintaining the currentIndex as the currentUser selected. So if the currentIndex is '0' then it will be users[0] and so on.
Wow, this was torturous to watch. Was this for a senior role? It should have politely ended within the first 10 minutes. No wonder the software industry is falling apart. Unwillingness to pay for decent talent === "great" product. Two such components within a codebase will turn that codebase into an unmaintainable trash heap.
How this guy is senior if not know how to use useState 😅
@@doug8590 the caliber of discussion in the theoretical portion (shown in earlier video) alluded so. To your point though, the fumbles with setState and the rest of it show a dire lack of hands-on experience. The interview should have ended at the first fumble.
Pure crap
Hmm It's not a difficult interview.