Interview practice

Frontend Developer (React)

2–5 years · Mid — React · JavaScript / TypeScript · State management · CSS · Performance · Accessibility

0–2 years 2–5 years 5–8 years 8+ years
scenario Component Design 1 of 6
A product manager wants to introduce a new UI component that combines several existing components but has strict performance requirements. How do you approach the design and implementation?
What a strong answer covers

Analyzes existing components for reusability; plans a new component structure to minimise props drilling; uses React.lazy for code splitting; applies memoization to prevent unnecessary renders; collaborates with the product manager to clarify performance metrics.

The follow-up you would get

After implementing the component, performance still isn't meeting expectations. What additional steps do you take to troubleshoot and enhance performance?

Could you have answered that?
ownership A feature you owned end to end 2 of 6
Can you describe a feature you owned from conception to delivery? What challenges did you face?
What a strong answer covers

Outlines the feature's purpose and scope; details the specific challenges encountered during development; explains decisions made regarding architecture and technology; describes the testing and feedback process; reflects on the impact of the feature post-launch.

The follow-up you would get

If you could revisit that project, what would you change?

Could you have answered that?
technical Performance 3 of 6
A React application has a component that re-renders every time its parent renders, causing a noticeable performance drop when the parent updates frequently. What steps do you take to diagnose and resolve this issue?
What a strong answer covers

Identifies the component's props and state to find unnecessary updates; checks if shouldComponentUpdate or React.memo can be applied; considers using useCallback or useMemo to memoise functions/values; profiles the component using React DevTools to confirm the cause of re-renders.

The follow-up you would get

What additional measures can you implement if the problem persists after memoising?

Could you have answered that?
technical CSS 4 of 6
You are tasked with improving the load time of a React application that uses a large CSS file. What steps do you take to optimise the CSS delivery?
What a strong answer covers

Analyses the CSS file for unused styles with tools like PurgeCSS; considers splitting CSS into smaller, component-specific styles; implements code splitting for critical CSS; evaluates the use of CSS-in-JS for dynamic styling.

The follow-up you would get

How do you handle CSS specificity to avoid styling conflicts in this approach?

Could you have answered that?
scenario State Management 5 of 6
A new feature requires you to integrate a third-party state management library into your existing React application. However, the integration is causing conflicts with your current state logic. What do you do in the first half hour?
What a strong answer covers

Identifies the conflicting state variables and logic; checks compatibility of the new library with existing state management; isolates the feature in a separate branch; begins to refactor state logic to accommodate the new library; considers using context or reducers for efficient state handling.

The follow-up you would get

The conflicts persist even after refactoring. What measures do you take to evaluate whether to stick with the new library or revert to the old state management solution?

Could you have answered that?
technical Rendering 6 of 6
You notice that a large list of items in your React application is causing a significant delay in rendering. What strategies can you employ to improve the rendering performance?
What a strong answer covers

Implements windowing or virtualisation techniques (e.g., react-window or react-virtualized); checks for unnecessary re-renders by profiling the component; breaks the list into smaller components; considers lazy loading data or components as needed.

The follow-up you would get

If rendering time is still excessive, what further optimisations could you explore?

Could you have answered that?
That is this set.

Load six more — you will get questions you have not seen first.

Give me six more →

Say your answer out loud before revealing. Reading the answer first feels like learning and is not.