DEV Community

Cover image for 44 React Frontend Interview Questions

44 React Frontend Interview Questions

Yan Levin on October 12, 2023

Introduction When it comes to interviewing for a React frontend developer position, being well-prepared for the technical questions is c...
Collapse
 
christiancho profile image
Christian Cho • Edited

I think this is great for more junior engineers as a way to test their understanding of how to execute a narrowly defined technical problem for a product feature. I would caution, though, on absolutism. For example:

Extract reusable logic into the custom hook.

Not always. I've seen cases where developers will write a custom hook to encapsulate some business logic, but in doing so will end up obfuscating important binding points to side effects. I prefer more explicit binding until it becomes clear that there's a shared understanding of those custom hooks.

Props are read-only and cannot be changed.

Not true. Props can be changed and the values in memory can be altered as JavaScript does not have protected values or properties unless using const primitives. Props can be changed directly, but they won't be reflected in the UI because doing so doesn't trigger a render. This can lead to odd behaviors and difficulty with debugging.

This approach minimizes the number of actual DOM manipulations and improves the overall performance of the application.

Virtual DOM implementations are actually slower than direct DOM manipulation. The virtual DOM exists as a solution for developers to write declarative code. The clear separation of the virtual DOM and the actual DOM is a way to reduce unintended side effects - it's a principle from functional programming.

There are other examples, but for the sake of your readers, I'll stop here.

Overall, this is a great resource for interviewing prep, but don't take it as an authoritative guide. I've seen too many opinionated junior and mid-level developers make blanket statements and I've rejected people after interviews because of it, especially if they're stubborn after correction.

Collapse
 
pengeszikra profile image
Peter Vivo

This list is cover near every area of react/nextjs programing. Expect using of typescript, which is mandatroy some company, but other company is avoide.

In my CV, I try to avoide amount of question with start talk about my module for react state handling: react-troll is the old one which is work well on interview, because on every interview is turn to talk about that module ( 1.5 years ago ). Now I switch the solution from JS to TS and this module is much more simple - give answer to type guarded useReducer : react-state-factory. So I think this is will be help me when I will change to new work (already not).

Collapse
 
rishamason profile image
Risha

Thank you very much! you've done a great job

Collapse
 
marco_43 profile image
Marco

Thank you very much for this article! It's like a reference for react questions, even if your not in an interview. So for me, learning react currently, it was very interesting and helpful to read and discover new and old thinks of react in a "nutshell". Thanks

Collapse
 
cezarytomczyk profile image
Cezary Tomczyk

I think all the questions are too focused on low-level problems. I ask questions that are general challenges and try to make the question reflect the problem rather than a detailed description of how to do it. For example: "How can individual components loosely communicate with each other?" Such a question does not impose a solution, but rather motivates and discovers different solutions to the same question.

Collapse
 
olsard profile image
olsard

Great article! Thank you!

Collapse
 
gulshan212 profile image
Gulshan Negi

Thanks a lot for sharing fantastic stuff here with us. Very detailed information with superb examples. I have also seen this post where the author listed 50 react interview questions with answers. Now I have found this one.
Thanks

Collapse
 
pavelee profile image
Paweł Ciosek

Great Article! Thank you! 🙏🙏🙏

Collapse
 
denys_dev profile image
denkochev

It was very enjoyable to refresh some knowledge. Thank you!

Collapse
 
jluterek profile image
James Luterek

This is a great study guide for those looking for a job, but I believe hiring managers can craft better questions - dev.to/jluterek/44-react-interview...

Collapse
 
manike2101 profile image
emmanuel ikeleji

Bootstrap frameworks with React seems very interesting #react #useState #virtualDOM #dependencyarray #singlesourceoftruth

Collapse
 
manike2101 profile image
emmanuel ikeleji

Bootstrap fra

Collapse
 
fancydeveloper profile image
fancydev

Hi,
Your article is helpful for me always. Thanks

Collapse
 
matkwa profile image
Mat Kwa

Nice one, thanks!

Collapse
 
gosucode profile image
Gosu Code

That was very helpful !

Collapse
 
oyousaf profile image
Omar ♔

Great article - thank you!

Collapse
 
marcelorafaelfeil profile image
Marcelo Rafael

Thanks a lot for this article.

Collapse
 
matek075 profile image
Matek

Nice article, very useful. Good job.
I believe that many people will appreciate it before recruitment session :-)

Collapse
 
vtvh profile image
Hải

useful to the ground

Collapse
 
brythewiseguy profile image
Bry

As someone who just finished a bootcamp with a large emphasis in React, this is a Godsend!

Collapse
 
williamccote profile image
Info Comment hidden by post author - thread only accessible via permalink
William C. Cote

unsentproject.net/, thank you for turning suppressed emotions into a powerful art form. Your platform is a masterpiece of human experience.

Collapse
 
bakugan profile image
Vu

Thank you very much

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
dsaga profile image
Dusan Petkovic

A very comprehensive list!

As a side question, which coding related problems or challenges are good to prepare for in front-end interviews?

Some comments have been hidden by the post's author - find out more