REAL React Interview Questions

REAL React Interview Questions

Peter Elbaum

3 года назад

183,043 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Peter Elbaum
Peter Elbaum - 11.05.2021 20:24

Are these questions helpful to you? What React questions have you encountered in your interviews? Let me know!

Ответить
Philcob Suzuki
Philcob Suzuki - 24.09.2023 12:41

I can code and build apps with React. But explaining React in an interview, that I'm not confident.

Ответить
SirLasagna
SirLasagna - 13.09.2023 08:55

Great video, and great advice! I have an interview myself today and this was great.

The ternary operator question was a bit misleading: when using rhe && operator to conditionally render some element, you can simply cast arr.length to a boolean using !!arr.length && ..., this will be a very simple way to still use the && operator

Ответить
Binod Tharu
Binod Tharu - 03.09.2023 09:34

class classname decision is purely based on react-core team's choice, & nothing else.
They knewnthat class can serve multiple meanings based on the contexts, which they dont wanted to get in.

Ответить
Darek
Darek - 05.07.2023 21:38

The className thing has nothing to do with the class being reserved syntax as it's working just fine in Preact.

Ответить
Alvaro_Mejia Kali_Epitixia
Alvaro_Mejia Kali_Epitixia - 23.06.2023 03:20

Good job, your explanations are great!

Ответить
Lindy T
Lindy T - 10.06.2023 00:09

Went to an interview for a React dev - got asked questions on AWS, cors, oauth, and oauth2.0. Not a single frontend or react question. What even is the point?

Ответить
Ankita Lath
Ankita Lath - 09.06.2023 16:39

Great questions, and I like how to you explain the area where to shine. I would encourage to please create more React or Angular questions like these. Amazing, thanks a lot.

Ответить
Rahul Das Adhikary
Rahul Das Adhikary - 24.05.2023 08:28

provide example and talk...

Ответить
Halopinx
Halopinx - 12.05.2023 15:53

what if I the condition is not about the length but it is undefined? ternary is long for that logical condition.

Ответить
Bernie Zhong
Bernie Zhong - 28.04.2023 22:46

This video was super helpful I never thought about whether or not the ternary or && operator would be better, since I usually use ternary but your response was definitely a huge plus to know

Ответить
y y
y y - 27.04.2023 17:28

Thank you so much! I was watching your video before my interview and I actually got asked the jsx question. I kinda knew it already, but, having researched it more thoroughly after this video, I was even more confident answering it. Really appreciate your help!

Ответить
Álvaro Fernando Souza
Álvaro Fernando Souza - 19.04.2023 20:39

Thank you.

Ответить
BanaCJ
BanaCJ - 12.04.2023 20:43

I like your video format, other creators are boring jejejje

Ответить
KASHMIR TECH TV
KASHMIR TECH TV - 22.03.2023 20:55

One of the best. And yes these are the questions that are asked mostly especially Use Effect

Ответить
c z
c z - 01.03.2023 15:36

Thanks, great video. What's are some of the shibboleths of an amateur with react?

Ответить
adnan tariq
adnan tariq - 13.02.2023 20:37

dude, /highfive

Ответить
Aleksei Vlasov
Aleksei Vlasov - 05.02.2023 05:55

Great content, Peter!

Ответить
hatifnatt57
hatifnatt57 - 24.01.2023 00:58

I wouldn't call JSX syntactic sugar since it has to be transpiled.

Ответить
dawheeler
dawheeler - 08.01.2023 18:26

If i would been asked with only these difficulty of questions then I would be probably a react developer already :/

Ответить
Julián
Julián - 02.01.2023 16:59

You can still do someArray.length > 0 && renderElement()

Ответить
Dmytro S
Dmytro S - 30.11.2022 14:54

bug with && easily solved by double conversion like !!condition

Ответить
Asagi Ai
Asagi Ai - 24.10.2022 04:02

The last question is interesting. Because I have only use ternary operators when rendering component's, if possible.
I think, I'm gonna fail from the first question alone.
I either would say
Jsx is a file you usually use to create components or
Jsx is like a javascript but you can also put your html codes there...
These are good questions that I should learn about.

Ответить
Jocelyn Nsa
Jocelyn Nsa - 11.10.2022 13:01

In my opinion, ternary makes code too long (sometimes we use null for the second condition) but it is easier to render component with a && operator

Ответить
Volodymyr Dovbenko
Volodymyr Dovbenko - 07.10.2022 14:43

Regarding point #5: that's why we need to use double inversion in such cases, which casts the value into boolean: !!items.length && ...

Ответить
Biruk Amare
Biruk Amare - 27.09.2022 04:27

Very helpful. Thank you! I appreciate if you talk about common mistakes programmers make when using react just like the && operator you mentioned in this video.

Ответить
03 Greedo
03 Greedo - 03.09.2022 04:07

Can’t believe i found this!

Ответить
UzbekDev
UzbekDev - 27.08.2022 03:07

Thanks bro I found it useful👌👌👌👌👌👌👌👌

Ответить
Lets get to 1mill without vids
Lets get to 1mill without vids - 17.08.2022 15:49

So why do we not need to use className in svelte

Ответить
Chil
Chil - 15.08.2022 15:04

I am working like a JS dev (react) for a long time. I was lost while during interview the CTO asked me what is "Hoisting". I stucked. After 5 secs of my cilence he asked me "whats the difference with let and var definition?" I understood the previous question.
So: during interview, a lot of companies use "smart definitions" you like to know. This is nothing related to the coding.

Ответить
Arrow Dan
Arrow Dan - 12.07.2022 09:42

Didn't know about this ternary and &&, now I know. Thanks Peter.

Ответить
Venky Babu
Venky Babu - 27.06.2022 09:03

React is how you want to respond and control the screen or code outputs. Just process management controls. Three things. Get put react respond pm.

Ответить
Ram Kumar
Ram Kumar - 25.06.2022 13:54

We deployed that 0 into SIT

Ответить
Seth Heinzman
Seth Heinzman - 21.05.2022 06:39

Dang I would ace that lol. That’s like the simplest stuff you can know. But I’ve been working with react alone while in college for two years and I also just read a react 17 book that explained a lot of in depth concepts so maybe I’ve just finally reached a point passed beginner 😂

Ответить
Somesh Gupta
Somesh Gupta - 30.04.2022 18:55

Most Asked Tuff Questions on React for 4+years experienced, you can watch part1 on channel - 'Codetailed'
Let see how many questions you can solve...

Ответить
Random Pointlessness
Random Pointlessness - 29.04.2022 06:57

What is virtual dom and how does it work ?

Ответить
Luveen Wadhwani
Luveen Wadhwani - 03.04.2022 21:33

Regarding the use of `&&` : This is an incomplete statement being compared with a ternary operator. To mimic ternary operators, always specify an `||` clause as well, so the expression always has something truthy to evaluate to in case the left-hand operand is false. So in the case of the Ken Dodds article, it would have worked just fine if he'd written `!!contacts.length && something || somethingElse`. I've used this code pattern in tons of production code with zero issues. (Also, note the use of `!!` to force an operand to a boolean value)

Ответить
Michael Montero
Michael Montero - 01.04.2022 20:53

amazing

Ответить
john mathew
john mathew - 18.02.2022 00:17

Instead of && we could use the nullish coellescing operator, ?? , to bypass the situation

Ответить
Henry Belcaster
Henry Belcaster - 14.02.2022 07:12

Was saving this for when I became ~technical~. Awesome stuff, Peter 👏

Ответить
Hamid Shoja
Hamid Shoja - 12.02.2022 00:32

I usually use !!arr.length && .... instead of ternary condition.

Ответить
Tobii
Tobii - 26.01.2022 05:07

i am watching this few hours to my interview, i hope i scale through.

Ответить
John Fernandez
John Fernandez - 23.01.2022 15:40

If the length is 0, isn't that desired behavior to not evaluate the right side since the array is empty?

Ответить
Karthikeyan S
Karthikeyan S - 22.01.2022 09:13

This was really eye opening. Keep up the great content!

Ответить
Tamer Durgun
Tamer Durgun - 17.01.2022 20:17

They asked me what are solid princibles and can we apply them on react projects last time :/

Ответить
down__lo
down__lo - 11.01.2022 22:23

On the question regarding ternary vs && operator, I could see how that could happen, however if he used an expression like "array.length > 0 && ..." would that not fix the issue? I think there are situations where && is more readable and more concise to write and maintain.

Ответить
stolensentience
stolensentience - 31.12.2021 01:51

Ah finally, questions if asked I could answer and get hired.

Ответить