DEV Community

Cover image for 50 Frontend Interview Questions
shrey vijayvargiya
shrey vijayvargiya

Posted on

50 Frontend Interview Questions

Save the blog for the future and CRACK any interview in the WORLD.

Under the Hood

I’ve given more than 100 interviews in my 4 years of industry experience. I am a self-taught developer and frontend is something I love and can do forever.

But when I interviewed those 100 companies I found that most of them revolve around a similar set of questions.

Even most companies have the same set of assignments 😁 I mean I’ve copy paste most of the code and submitted it, Why not, I don’t want to waste my time in giving bullshit assignments when I’ve shown the HR 70+ projects collection.

I don’t know why the hell they still want me to write code for them when they can see those 70+ GitHub projects and for verification, they can check the commits list, it’s ME, it’s my NAME on those commits list.

Never mind, if your fave such situations I mean you have the right to ask for payment for the assignment, imagine if your code is way good and they end up using it and don’t even select you because they find another candidate fitter.

Let’s come back to the story, here is the set of questions, those 50 questions, I am still adding more and more questions to be patient if you find more questions in future.

Save this story for the future, when you prepare for the interview simply go through them.

No need to memorise the answer just try to understand the concept and follow the leads.
Enter fullscreen mode Exit fullscreen mode
  1. What is React
  2. What is React lifecycle?
  3. Explain Virtual DOM in React and its significance
  4. What is JSX
  5. Explain states and props
  6. What are props drilling in React?
  7. What is the key prop in React and its benefit?
  8. What is CSR(client-side rendering)
  9. What is Higher Order Component in React
  10. What is React Context API and why do we need it?
  11. How to improve React application performance?
  12. How to avoid re-rendering in react component
  13. What are pure components and stateless components
  14. Explain code splitting in React
  15. What are Hooks and why they are introduced
  16. What are controlled and uncontrolled components
  17. What are the Container component and Presentational component
  18. What is Redux
  19. What is actions, reducers and store does in Redux
  20. What is SSR(server-side rendering)
  21. What are useCallback, useEffect, useMemo and useLayoutEffect
  22. what is useRef in React
  23. Explain the difference between var, let and const in javascript
  24. What is async/await in Javascript
  25. What is a PROMISE in Javascript
  26. Define indexOf and includes a method in javascript
  27. What is map(), filter() and reduce() methods in javascript
  28. Explain event loop in javascript
  29. Explain setTimeOut and setInterval
  30. Explain closures and hoisting in Javascript
  31. Difference between arrow function and functional declaration
  32. What is Next JS
  33. What is SSR, ISG and SSG?
  34. What are getInitialProps and getStaticProps?
  35. Explain dynamic importing in React
  36. How to add routing in React applications
  37. How to add pagination in React application
  38. How to handle responsiveness in React application
  39. How to improve SEO of React application
  40. Explain React Fiber and its benefits
  41. What do Babel and Webpack do
  42. Why do we need to transpile React code?
  43. What is the strict mode component and How to use it?
  44. What is lazy loading and how to add it?
  45. What are synthetic events in react
  46. What is React Portal
  47. What is the reconciliation algorithm in React?
  48. What is REST API
  49. How to fetch data using API in the front, explain axios and fetch module
  50. How to access the Window object in React application

Ultimate Frontend Development Roadmap Template

Image description

If you want to start your Frontend journey, I made this Ultimate Frontend Development Roadmap template.

Things you will get in the template
Lifetime access and lifetime upgrade of a roadmap for frontend development
Extensive and top-notch references to learn and stay updated in frontend development
Growth Tracker to track your growth while learning each tech stack required in frontend development

Get the Template

Conclusion

Time to leave, I hope you will love this, more in the next stories.

Do follow for more such stories or subscribe you will directly get an email whenever I write a new story.

Keep developing
Shrey
iHateReading

Top comments (18)

Collapse
 
bytebodger profile image
Adam Nathaniel Davis

I was recently asked: "What are the Container component and Presentational component?" And it threw me for a bit of a loop - because in my experience, hardly anyone in the React community uses this terminology anymore. In fact, it can even be thought of as deprecated.

Don't take my word for it. Dan Abramov himself states as much in the top of this article:

medium.com/@dan_abramov/smart-and-...

Collapse
 
peerreynders profile image
peerreynders

In fact, it can even be thought of as deprecated.

That was in 2019.

Now in some circles there is a practice of separating pure and effects components to decouple presentation from effects.

Cognitive Loads in Programming

Collapse
 
bytebodger profile image
Adam Nathaniel Davis

Pure vs impure (or, as you put it, pure vs effects) is not the same dichotomy as container vs presentation.

Thread Thread
 
peerreynders profile image
peerreynders

See this discussion.

Both suggest that at times component-centric can be too lumpy.

I think Dan Abramov was getting frustrated that the approach was being mindlessly applied without a priori assessment of the trade offs.

Thread Thread
 
shreyvijayvargiya profile image
shrey vijayvargiya • Edited

Again it hardly matters, I don't think so we write code with 2 components in mind whether it's presentational or container we just write when we want to write that's it.

Thread Thread
 
peerreynders profile image
peerreynders

is not the same dichotomy as container vs presentation.

Looks like with React Server Components it's been reincarnated as “Presentational and Data Components”.

Collapse
 
shreyvijayvargiya profile image
shrey vijayvargiya

Yeah, it's a bit of deprecated and if anyone ask me these questions I simply say the truth even if I don't knew the answer

Collapse
 
khalildev profile image
Khalil Dev

Recently, I had an interview for frontend position. I would say that I was asked around 80% and above of these. Nicely listed!!

Collapse
 
shreyvijayvargiya profile image
shrey vijayvargiya

Glad to hear that !!!!

Collapse
 
taepal467 profile image
Chantae P. • Edited

Question, do interviewers ask algorithm questions as well?
Great post by the way. Will definitely come in handy.

Collapse
 
shreyvijayvargiya profile image
shrey vijayvargiya

Yes they do, but basic ones not really in-depth DSA

Collapse
 
taepal467 profile image
Chantae P.

okay, thank you.

Collapse
 
clericcoder profile image
Abdulsalaam Noibi

Thanks for sharing

Collapse
 
shreyvijayvargiya profile image
shrey vijayvargiya

Thanks for reading and the comment !!!

Collapse
 
nekomamoushi profile image
nekomamoushi

The title is a little misleading…

Collapse
 
shreyvijayvargiya profile image
shrey vijayvargiya

In what sense?

Collapse
 
nekomamoushi profile image
nekomamoushi

Because the title says FRONTEND questions but it's all REACT questions :)
So for me it's misleading.

Thread Thread
 
shreyvijayvargiya profile image
shrey vijayvargiya

Well not really, in 2023 frontend development means React is a must.

I've added Javascript questions also, including map, filter, promises, async-await, closures and so on and only those things are asked when it comes to javascript.

Rest, React is imperative so most of the things will revolve around React and that comes under Frontend development itself.