100+ ReactJS Interview Questions and Answers for junior and senior levels of frontend developers
”
StoryLine:
“Each interview will give different experience. Whenever we prepare for any technical interviews, we will cover various topics from basic concepts to tricky questions. Enrichvia will share the experience from many developers who faced technical interview in ReactJS.”
Content:
100+ React Interview Questions and Answers for experienced in all levels
#basics
* What is React?
* What are the main features of React?
* What is JSX, and why is it used in React?
* What is the difference between a functional and class component in React?
* What are React Fragments?
* What is the latest version of React?
* What are the latest features of recent version of React?
* What is the difference between React Native and React?
* When to use JSX.Element vs ReactNode vs ReactElement?
* What are components in React?
* What is the difference between stateful and stateless components?
* How do props work in React?
* Can you explain the difference between props and state?
* How to specify a port to run a create-react-app based project?
* What is the difference between state and props in React?
* What is the difference between using constructor vs getInitialState in React?
* What’s the difference between “super()” and “super(props)” in React when using es6 classes?
* How to pass data from child component to its parent in ReactJS?
* What is the use of componentWillMount() in React Hooks?
* What is mapDispatchToProps?
* How to get current route?
* How to add fonts to create-react-app based projects?
* where is create-react-app webpack config and files?
* How to compare oldValues and newValues on React Hooks useEffect?
* How will you communicate between related react components?
* What are the advantages of using Redux with React?
* When you will use ngOnDestroy and ngAfterViewInit?
* Difference between contentChild and viewChild?
* Difference between templateRef and elementRef?
* What are the different type of Decorators in React?
* What are pipes in React and how do we create custom Pipe?
* What are Lifecycle hooks in React?
* Explain Dependencies injection? Give examples to implement the feature.
* Different types of change detection methods?
* How react differ from other frameworks?
* Ng-template and ng-container uses?
* What is local and session storage? – js
* How to check html version in react application?
* How so we communicate between components explain with example.
* Explain Directive and their types?
* How will you create custom directive and use in Template?
* Explain Data binding in react?
* Explain the types of decorators in React?
* Explain in detail about React project that how you will create create, build, deploy app?
* How to implement responsive web design? – css
* What is difference between ng-template and ng-content?
* What are portals in React?
* How do you use portals for rendering components outside of their parent?
* What is a HOC in React?
* How does a HOC differ from a regular component?
* What are error boundaries in React?
* How do error boundaries work, and when should they be used?
* What is the Context API in React?
* How does the Context API work for passing data globally?
* What is the difference between using Context API and Redux?
* How do you handle events in React?
* What is synthetic event in React?
* Can you explain event delegation in React?
* What are React Hooks?
* What is the useState hook?
* What is the useEffect hook, and how is it used?
* How do useMemo and useCallback work?
* What is the difference between useEffect and useLayoutEffect?
* What are React lifecycle methods?
* Can you explain componentDidMount and componentWillUnmount?
* How does shouldComponentUpdate work?
* How are lifecycle methods handled in functional components with hooks?
#routing
* What is interceptors and how to implement it?
* How to implement authentication and authorization. If we have a role of admin and user then how to handle it?
* Explain about Route guard and how we need to use it?
* What is React Router?
* How do you handle navigation in React applications?
* How does useNavigate work in React Router v6?
#performance
* What are the different ways to improve app performance?
* What is React Suspense?
* How does lazy loading work in React?
* What is the purpose of lazy()?
* How do you optimize the performance of a React application?
* What are some ways to prevent unnecessary re-renders in React?
* How does the React.memo function work?
#configuration
* What is the use of react.json?
* What is the use of tsconfig.json?
* How will you set different enrvironment for testing?
* How will you generate component in terminal?
* How will you generate service in terminal?
* How will you generate pipe in terminal?
#data-sharing
* What are the ways you can share data in React?
#forms
* How do you handle forms in React?
* What is the difference between controlled and uncontrolled components?
#rxjs
* What is Observables and Promises?
* How many types of observable in React?
* What is the difference between Share and ShareReplay?
* What is the difference between AsyncSubject and Subject?
* How to handle multiple HTTP calls parallely?
* Diferrence between switchMap and mergeMap?
* What is the use of operators in rxjs?
* What is subject and behavior subject? Use case of these two.
* What are cold observables in rxjs?
* What are RxJS operators have you used?
* What is the use of debouncetime operator?
* What do you meant by forkJoin Operator?
* Have you worked with RxJS operators, explain, while explaining they asked in which scenarios we use concatmap, switchmap, forkjoin, mergemap?
#redux
* What is ngRx? Advantages and Disadvantages of it?
* What is difference between Action and Reducers?
* What is state in React, and how is it used?
* How do you manage the state in a React component?
* What is the difference between local state and global state?
* What are some common ways to manage global state in React applications?
#unit-testing
* How do you test React components?
* What is the purpose of Jest and React Testing Library?
#upgrade
* How will you upgrade React to Latest? Explain the steps involved in it?
Conclusion:
ReactJS developers have huge market all over world. They can enrich web with good UI in all sectors based on client needs. Becoming ReactJS should have good knowledge in HTML, CSS, JavaScript.