reactjs question aprt 3
I hope this helps:
https://github.com/sudheerj/reactjs-interview-questions
https://github.com/yangshun/tech-interview-handbook
https://github.com/jwasham/coding-interview-university/tree/main
https://github.com/DopplerHQ/awesome-interview-questions#reactjs
https://github.com/enaqx/awesome-react
Thanks everyone!! The interview went awesome. They asked some scenario questions rather than how to code this or that. Some questions they asked were:
state management, what you use and why
CSS framework and could you make it responsive and how
How react interact with DOM
Any library used for forms?? And why
Any library related to tables - I said react-table and why I used it
Git rebase
why typescript
some scenario questions ⁉️
APIs and what you use for it
------------------------------------------------------
A question I haven't really seen raised, which I both ask and have seen being asked before:
what problem does async/await syntax solve and what other kinds of approaches to async programming exist(this gives me an idea of understanding of the event loop and how they would potentially refactor code or make code more consistent) ------------------------------------------------------
what is a closure?
what is shallow/deep copy?
what is hoisting? how does it work for functions and for variables?
what is a pure function?
how does reconciliation work?
what is lazy loading? when should you use it?
sever side rendering / isr / ssg
what is the difference between types and interfaces in typescript?
when should you use a context to manage state instead of redux/local state
higher order components
webpack / tree shaking
concurrency / event loop / callback queue
These are some I overheard from my lead.
List of react frameworks you've worked with?
Rendering strategies ssr, csr, isr... Does React support ssr out of the box? Why not just use React?
State management do you know redux? redux vs context. Pros and cons of redux. When it triggers re-render.
Form & form validation...
That's all I can remember.
what is a virtual DOM? what problem does it solve?
what is prop drilling and how to avoid it?
why do/don't we need 3rd party state management libraries?
what is key prop and why do we need it?
what is SSR and how does it work?
You probably will get lots of questions about JS, so let's start with my favorite: what's the closure and how to use it?
Why does infinite re-rendering happen in a useEffect and how do you prevent it
Describe a scenario in which you would use useMemo
Why is Typescript/TSX used for large applications
Provide a large but working component (300-500 lines or so) and ask them to refactor it into reusable components and utility functions
Hey there! Sorry to hear about your interview experience, but don't worry - it happens to most of us, but preparation is the key to success. Here are some additional React.js topics you might want to brush up on for your next interview:
State management (Redux, Context API, MobX)
Hooks (useState, useEffect, useContext, custom hooks)
Performance optimization (React.memo, useMemo, useCallback)
Server-side rendering and Next.js
Testing React components (Jest, React Testing Library)
Component lifecycle methods (class components vs. functional components)
React Router for navigation
Error boundaries and error handling
Prop types and TypeScript integration
React portals and refs
What are some scenarios where you would return a cleanup function from useEffect?
Let's say I have a class based component, and it is too large to feasibly refactor into a functional component, but I want to render something inside the component based on a hook. How would I do this?
What is a pitfall of using React context as a global state manager?
• What will happen, if you remove first three items in list of items, where keys are indexes of array?
Difference between useEffect vs useLayoutEffect? When is forward ref used? How to use useImperativeHandle? What does Error Boundary do?
In 5 years as a Frontend Developer I never used useImperativeHandle and forwardRef, maybe used useLayoutEffect once. This is book knowledge about edge cases that are mostly irrelevant in most projects.
I'd rather ask more behavioral questions to get to know the way how someone's approach to solving a technical problem is instead of asking some stuff that is hidden somewhere deep in some framework documentation.
> react hooks basic understanding -> what is HOC and HMR -> how react works with DOM -> when do you work with context and when to use redux -> how use effect works with dependency and all scenario -> implement a global store for the cart system and use redux and explain the flow like how the store is getting data storing data ( could be hard if you have to develop in a few minutes) -> how to optimize the react app and what could be the reason for the high complexity -> how to control re rendering in react -> react lifecycle explain -> what is the better way to avoid prop drilling -> how to use react routing (basic one)
\\\What are event boundaries?
What state management system would you use for a given situation and why?
UseMemo vs React.memo?
useMemo vs useState with example.
Creating your own hooks use case.
What are synthetic events and why does react uses them
I take 2-3 interviews per week on average for react devs. The most common one I ask my candidates is this:
Explain how react works under the hood to me like I'm 5 yr old
What problem did react come to solve?
What are composable components?
How do you separate logic and style?
What are the security measures to be taken to avoid data leak in frontend TYPESCRIPT specific
How do you validate form input data
How do you design typesafe components GENERAL
what are accessible components, how do you design them ?
State management - redux vs context API.
Comments
Post a Comment