React JS Live Coding Interview 2023 - Cracking the Interview (Mock practice)

preview_player
Показать описание
We interviewed a college student for React JS live coding mock interview round. There were react js-based component development questions which checked for some HTML and React knowledge

#reactjs #javascript #coding #interview #interviewquestions #mockinterview

🤯 Crash Courses (Single Video)

🧑‍🏫 Full Course Playlists

💻 Projects Playlists

🕹 Mini Projects (Single Video)

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

Good that you are suggesting, not like other interviewer who just stay silent and think that you know nothing

WaqarAhmad-qzmv
Автор

A good strategy is to talk though your thought process. That way its easier for the interviewer to help and understand.

shubhamgoyal
Автор

while i might not know the syntax at the but as soon as i saw the questions what he can do it is:
first map to generate options selection for country, based on country code i.e. "in", upon selection of first item, he could filter the map to get selected country & selected cities in 2nd dropdown.

SunilparajuliKenshin
Автор

No stress.. No stress... YOU'RE DOING IT WRONG!! No stress.. No stress... YOUR SELECT STATEMENT IS BAD! No stress... No stress...

ahndeux
Автор

People are who are looking jobs are busy how to crack interviews and people who are working as freelancers busy in developing applications using gpt-4 only difference both of them is person came for interview will work like a machine and freelancer will make machines work.interview is just a process of filtering competition not knowledge .alteast this youtuber is supporting sharing this video to lower the pressure of candidates going for interview 🎉

SivaAbhilash
Автор

Great work Sir!!
Video would be way better if you could explain the code at the end, will really help beginners.

iamkamal
Автор

import "./styles.css";
import {useState} from 'react';

const countryArrays = [
{
country:"India",
value:"In",
cities:["Telangana", "AndhraPradesh", "Rajasthan", "Maharashtra"]
},
{
country:"Pakistan",
value:"Pak",
cities:["Pak-One", "Pak-Two", "Pak-Three"]
}
]


export default function App() {
const [array, setArray] = useState(countryArrays);
const [state, setState] = useState([])

const changeStates=(e)=>{
const filtered = == e)
setState(filtered[0].cities)
console.log(state)
}

return (
<div className="App">
<select
{
array.map((item, index)=>(
<option
))
}
</select>
<select>
{
state.map((item)=>(
<option value={item}>{item}</option>
))
}
</select>
</div>
);
}
I tried

rajubojja
Автор

I'm very impressed with that interview er. He's very helpful❤

subhasisdas
Автор

const [country, setCountry] = useState(0)
Loads cities in India on initial render :)

aparnas
Автор

A very informative video on how 2 guys are looking for a typo in the code for about of 15 minutes. Ty😁

PaulGreen-lkym
Автор

35 mins 😅 :
export default function App() {
const [country, setCountry] = useState("");
const [cities, setCities] = useState([]);
function handleChange(e) {
const selectedCountry = e.target.value;
setCountry(selectedCountry);

const filterCities = countries.find((ele) => ele.value === selectedCountry);

setCities(filterCities ? filterCities.cities : []);
}
return (
<div>
<select
value={country}
onChange={(e) => {
handleChange(e);
}}
>
<option value="">Select country</option>
{countries.map((ele) => (
<option
))}
</select>

{/** set cities */}
<select>
{cities.map((ele) => (
<option value={ele}>{ele}</option>
))}
</select>
</div>
);
}

anuragsonkar
Автор

Hi sir! This is very helpful.Pls create more react interview codings in the future.

kk
Автор

That's a good approach, For second dropdown, you can try filter the countries with the selected country and extract the cities property and chain that output to map function... like below

<select>
{country &&
countries
.filter((c) => c.name === country)[0]
.cities.map((city, i) => {
return (
<option key={i} value={city}>
{city}
</option>
);
})}
</select>

sreeharinallapaneni
Автор

Helps me a lot i am copying the question code by watching video and then a get this code sandbox link .

arpityadav
Автор

The question was very helpful for those who prepare for Interview I'm also preparing and I followed your whole playlist.. Thanks for the sharing valuable information sir 🙏

rsdeathgaming
Автор

Yes that was a good solution but there was a mistake that he did. He used country'sIndex as a value in second selectbox and you can check when he's selecting pak then karachi is automatically getting selected. Thats a note for viewers too although I know manny of you have figured it out. Great work though

himanshuvatsh
Автор

I was stressed to watch him try and fix his mistakes, it's even know difficult when someone is watching

blackpurple
Автор

This same question was ask in my interview and I live coded this in a great was the interviewer was impressed and I got a offer from the company thanku sir for this types of video☺️

harshagarwal
Автор

I have a slight confusion in this video, maybe i am wrong, but he created a state that accepts an object, then assigns a index(option's value) to it. Is it possible or i misunderstood something?

imnawasthi
Автор

its not a good habit to just sit silently and code, talk through your process as well.

nobitacc