Тёмный

Why React uses className? | 2023 React Interview Questions and Answers 

UI Engineering
Подписаться 3 тыс.
Просмотров 20 тыс.
50% 1

If you are preparing for 2023 React Interview, class vs className might be one of the most popular questions. But most of the answers on the internet are usually only partially true. We'll dive into the details to prepare you to ace your interview!
⏱️Timestamps:
00:00 - Introduction
00:16 - Common bad answer
00:28 - JSX Transpilation
00:57 - DevTools Example
02:15 - Dan Abramov's post
02:30 - Consistency with DOM
03:40 - Cost of migration
04:03 - Destructuring props
05:03 - Crush your interview
06:04 - Interview Checklist

Опубликовано:

 

21 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 69   
@UIEngineering
@UIEngineering 11 месяцев назад
Hey everyone! 👋👋 First of all, thanks for all the likes and comments! I just want to clarify one thing that is coming up in the comments: This video is not about answering a tricky question with a chain of trivia facts that you have to remember exactly. It's more about: 1) How, during an interview, you can link multiple different topics to showcase the extensiveness of your knowledge. 2) How a seemingly easy and straightforward question can have multiple layers of depth, and how you can unpack it. And as someone has already noticed, I prefer to dig into the "why" rather than the "how", because I find it more exciting and fun to talk about. So if this is what you like, stick around, because the next video is coming! 😁 Thank you all for the amazing support. I really didn't expect this awesome reception for only my second video ever. 🙏🙏🙏 The ways of the RU-vid Algorithm are strange - having 10 subscribers for 1,5 month, and then suddenly, 2 days later, it's 250! 🤯 I hope I won't disappoint you all. I'm only just starting on RU-vid, but thanks to you, I'm very motivated to keep going. Cheers!
@mskzzz
@mskzzz 11 месяцев назад
Still a useless question and knowing the answer to the question doesn't make you a better dev ..
@michaeljmeyer3
@michaeljmeyer3 11 месяцев назад
Personally, I have not met many devs that can give decent interviews. It is truly a skill that relies on a lot of intuition. Presumably there is a massive associated cost to losing leads and interviewing in a negligent manner; Both when the talent pool is shallow or deep. I get that this is more about the why, rather than the answer, and I can get behind that with the understanding that if an applicant answered this to this level of correctness, I could care less. One should be cautious though, as you have to be careful with open ended questions as you are possibly setting the interviewee up for failure - especially with exceptional talent. The Dunning-Kruger effect can easily siderail any effort in gauging acumen in such a short window. In fact, the dealing with DKE in interviews would make for an exceptional video for senior+ developers. Back to the point, If the conversation becomes frustrating to you or the interviewee, or leaves you without enough technical insight, you may have just failed as an interviewer. Sure, the interviewee may have failed miserably either way, but environment is everything. That said, I think this is a banger of a video and it really got some great conversation going. Good work!
@MominBinShahid
@MominBinShahid 10 месяцев назад
Subscribed mate! Please continue doing what you are doing, it's great 👍
@klimmesil9585
@klimmesil9585 11 месяцев назад
I don't want any job that sees value in knowing any of this, but it's still fun to know
@wawawawa919
@wawawawa919 11 месяцев назад
Great video! Please do more, I'd love to learn more from you!
@netssrmrz
@netssrmrz 11 месяцев назад
Really good video. I enjoyed the pace, technical details, and no time wasting intro. Also nice to know of one more reason why there are so many better frameworks ;-)
@feldrokdev
@feldrokdev 11 месяцев назад
This is great! Thanks and would love to see more.
@nealgrindstaff8651
@nealgrindstaff8651 11 месяцев назад
Yeah, love this. I thought for sure you'd have like 30k or higher subs. Do more of these. Subbed.
@torche6403
@torche6403 11 месяцев назад
Nice one! Detailed vdo! Make more such..I'm about to prepare for interviews
@mateusztwardy64
@mateusztwardy64 11 месяцев назад
Very good and complex explanation. Subscribed. Powodzenia.
@ayushkushwaha171
@ayushkushwaha171 11 месяцев назад
good video! keep 'em coming
@okbaalla8451
@okbaalla8451 11 месяцев назад
This is Insightful fr
@up2dul
@up2dul 11 месяцев назад
What a good explanation. Subscribed!
@UIEngineering
@UIEngineering 11 месяцев назад
Thank you! Welcome aboard! 🙌
@meaningmean
@meaningmean 11 месяцев назад
Thank you!
@tausifraja4543
@tausifraja4543 8 месяцев назад
Thank you so much for this sharing video ❤
@UIEngineering
@UIEngineering 8 месяцев назад
It's my pleasure, thank you ❤
@tommyoliver8992
@tommyoliver8992 11 месяцев назад
This is great stuff. You might want to do more short form videos for YT and TikTok, I'm sure you would go viral in no time.
@UIEngineering
@UIEngineering 11 месяцев назад
Thank you very much! I'm experimenting with shorts on RU-vid, but to be honest I don't feel it very well right now. I always catch myself trying to say more that I can in those 60 seconds. It's very limiting for a content if you want to dive deep and actually explain something, not just show that it works. But who knows, maybe I'll find a way.
@migueljara9399
@migueljara9399 11 месяцев назад
That kind of content is for people who don't wanna put the time to actually learn something. Screw 'em
@pookiepats
@pookiepats 11 месяцев назад
Facebook openly acknowledged they lost 60billion trying to push short form content, it's empty calories, you're right to follow your gut. Not all advice is informed advice kids.
@piyushpathak1186
@piyushpathak1186 11 месяцев назад
To the point 🙌🙌
@AnsisPlepis
@AnsisPlepis 11 месяцев назад
Get this man more subscribers!
@UIEngineering
@UIEngineering 11 месяцев назад
It seems like your ask has been successful 😅 Thanks!
@dision9470
@dision9470 11 месяцев назад
Great video!
@UIEngineering
@UIEngineering 11 месяцев назад
Thanks! Glad you enjoyed it!
@lukewood5751
@lukewood5751 11 месяцев назад
Great explainer video. I really enjoyed watching it - and learned something along the way! I have to wonder what signal a company thinks they're extracting by asking trivia like this though...
@UIEngineering
@UIEngineering 11 месяцев назад
Hey, thanks so much, means a lot! I see this question is popping up a lot, so I'll try to refer to it in a separate comment at the top.
@dbslqor
@dbslqor 11 месяцев назад
hi do you have a blog? I really like how you explain with "why" and not "how"! Would love to read more about your content.
@offroaders123
@offroaders123 11 месяцев назад
Exactly! Good description for that
@UIEngineering
@UIEngineering 11 месяцев назад
Thank you! Nice to meet a fellow sould, who likes the "how" 😄 I'll try to keep it up! Unfortunately, I don't have a blog. Actually it's the first instance of me publishing anything, so now I'm just focusing on creating some consistency here. But maybe in the future I'll try with a blog, or maybe twitter (sorry, X :D) account.
@e_tas_
@e_tas_ 2 месяца назад
1:30 programming lore go crazy
@JunkerSchmidt
@JunkerSchmidt 11 месяцев назад
Hi! Can you tell please, what font/typeface had been used on thumbnail? Phrases "React interview why classname not class" are written with it.
@wasaabbi
@wasaabbi 11 месяцев назад
Nie wiem z jakiej mańki tu trafiłem ale jak już jestem to pożyczę powodzenia w rozwoju i zdobyciu zagranicznej audiencji
@UIEngineering
@UIEngineering 11 месяцев назад
Dziękuję ! 🙂
@emmanuelchucks
@emmanuelchucks 11 месяцев назад
Your channel is underrated
@Andrey53283
@Andrey53283 11 месяцев назад
Totally agree
@UIEngineering
@UIEngineering 11 месяцев назад
Thank you! It already made a huge jump since your comment, but I appreciate it
@MICHAELZ50
@MICHAELZ50 11 месяцев назад
Great video! but I do not understand the part of "Applying multiple CSS class names conditionally". How is this related to class/className convention? Either 'class' or 'className', we can still apply multiple CSS conditionally right?
@UIEngineering
@UIEngineering 11 месяцев назад
Hey, exactly. It's just an extra note that you can make. Not directly related to the problem that "className" itself solves.
@SurfsUpSeth
@SurfsUpSeth 11 месяцев назад
Why does class work sometimes 😂 I’ve accidentally done class before instead of className but it seems to me like it wouldn’t work but it does on occasion
@dumchik7290
@dumchik7290 7 месяцев назад
I couldn't get what are dedicated npmpackages u have told at 6:01. Could u please mention again?
@UIEngineering
@UIEngineering 7 месяцев назад
Hey, sure thing! :) www.npmjs.com/package/classnames www.npmjs.com/package/clsx
@FzsHotDogInDonut
@FzsHotDogInDonut 11 месяцев назад
Will you explain this aria and data things on the dom. And how to use them.
@UIEngineering
@UIEngineering 11 месяцев назад
Hey, not sure what exactly you are asking about, but the general idea from the video was that you can simply use aria and data attributes in JSX and it will be passed down to the DOM by React. So you don't have to worry that React has a different names for them. But, if you want more to know more about these attributes in general, for now I can link some nice resources: Data attributes: css-tricks.com/a-complete-guide-to-data-attributes/ Aria attributes: web.dev/learn/accessibility/aria-html/
@FzsHotDogInDonut
@FzsHotDogInDonut 11 месяцев назад
@@UIEngineering thanks man. I don't know what these aria or data attributes do. I was hoping of could make a tutorial on these.
@UIEngineering
@UIEngineering 11 месяцев назад
​@@FzsHotDogInDonut Sure! I'll add it to my bucket list, but can't promise anything. I hope those links will help in a meantime though 🙂
@hipposhark
@hipposhark 11 месяцев назад
2:05 chaining* cool vid 👍
@UIEngineering
@UIEngineering 11 месяцев назад
Oh yeah, thanks, that's what I meant 😊
@HorstKirkPageKian
@HorstKirkPageKian 11 месяцев назад
So the most common bad answer ist not so bad after all. It's just missing some details :)
@Euquila
@Euquila 11 месяцев назад
I think I might start laughing at them if uncontrollably if they seriously asked me this question
@UIEngineering
@UIEngineering 11 месяцев назад
You might want to hold yourself back😅 What if you are asked about it as a side question, during a coding challenge? Like: "BTW do you know why you have to use className instead of a class?"
@HiYesThisIsJake
@HiYesThisIsJake 11 месяцев назад
​@@UIEngineeringthen they can have a conversation, but it's hard to see how this question assesses an applicant's capabilities
@0oShwavyo0
@0oShwavyo0 11 месяцев назад
@@HiYesThisIsJakeshouldn’t you know what reserved keywords your language has and what the rules are around them? What’s a better question in your opinion?
@HiYesThisIsJake
@HiYesThisIsJake 11 месяцев назад
@@0oShwavyo0 if you want to test that knowledge, then you can ask about it directly instead. This question doesn't test that -- this question just happens to have a wrong answer relating to keywords.
@0oShwavyo0
@0oShwavyo0 11 месяцев назад
@@HiYesThisIsJake not at all, the destructuring argument is directly a result of it being a reserved keyword.
@obcacywilizacja8483
@obcacywilizacja8483 11 месяцев назад
You basically say that the “wrong” answer is actually correct 4 minutes later.
@stanislauyan3204
@stanislauyan3204 11 месяцев назад
If you ask me about why className I will never go to the company which has such engineers who ask such useless question!
@edgay
@edgay 11 месяцев назад
No way this is ever a real interview question? This just seems like some nice trivia knowledge to have, but adds nothing valuable to your skillset
@MahbuburRahman-uc7np
@MahbuburRahman-uc7np 11 месяцев назад
No offense, but he seems like the engineer to ask someone this sort of gotcha question. Also, the whole React and Next ecosystem is big pile of shit. You would need PHD in both these topic if you want to build something useful compared to other frameworks.
@ancellery6430
@ancellery6430 11 месяцев назад
@@MahbuburRahman-uc7np maybe if you want to use all the advanced features, but the basic react docs and excellent and easy for a beginner to pick up. Overall its a straightforward, highly documented, and highly used framework, so really its perfect for a beginner
@UIEngineering
@UIEngineering 11 месяцев назад
Hey @edgay, thanks for the comment. And yeah, you would be surprised. From my experience, it is actually VERY common to get questions that don't test any particular skill in practice, but rather an overall understanding of the ecosystem. Especially for mid/senior positions, it's interesting to test if a candidate has a deeper understanding of some nuances that come with the tools they are using, and if they are able to paint a bigger picture and articulate it well. For me personally, every question is just an opportunity to show my interest in the topic and how many exciting things can hide behind a seemingly easy question. And of course, don't take this video as the only definitive answer that you have to follow exactly. I remember being asked if React is a library or framework in one of my interviews. I didn't agree with the interviewer (sic!), but I showed that I have broad knowledge and some good arguments too, and I got the job ;)
@UIEngineering
@UIEngineering 11 месяцев назад
@MahbuburRahman-uc7np none taken. But take into account everything stated above, that it is not with a mindset of "there is only a one good answer", and it's definietely not a "gotcha" question that aims to just "catch" you at not knowing something. I wouldn't call the whole ecosystem a pile of shit. I think there is a sentiment that the frontend became a place where a lot of things are overengineered, but really it's just a complexity that comes with Web becoming the biggest software platform of modern times. How many apps we had 20 years ago? How many apps we use by accessing them through a browser today? But I do think that React is very resource-hungry and I am a skeptic in terms of moving everything to SSR. The whole environment is changing rapidly, but I think it's exciting :)
@albertclemente8739
@albertclemente8739 11 месяцев назад
It's not always, but such questions come sometimes. For a junior dev possition should be more important how than why imo, but still happns and anyway a very nice to know. Comming from a how > why perso
@dokkenrox
@dokkenrox 11 месяцев назад
Seems like interesting trivia but not really a good interview question.
@gordonfreimann
@gordonfreimann 11 месяцев назад
what a load of bs. It has no significant meaning why it is className. why is this important for the interviews i dont understand. who cares why it is className instead of class for a framework that is already an abomination tbh
Далее
Goodbye, forwardRef
15:59
Просмотров 6 тыс.
This or That 🛍️
00:52
Просмотров 6 млн
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Просмотров 7 млн
Every React Concept Explained in 12 Minutes
11:53
Просмотров 483 тыс.
Why 95% of Modals should be Local (in React)
10:01
Просмотров 11 тыс.
Why Signals Are Better Than React Hooks
16:30
Просмотров 464 тыс.
Stop Doing this as a React Developer
12:27
Просмотров 161 тыс.
Senior-Level Understanding of React Portals
5:29
Просмотров 1,1 тыс.
5 Pro-Level React Do's & Don'ts
30:06
Просмотров 175 тыс.
This or That 🛍️
00:52
Просмотров 6 млн