0–2 years · Junior — React · JavaScript / TypeScript · State management · CSS · Performance · Accessibility
Checks the dependency array to ensure it's set correctly; considers whether the effect depends on any state or props that might change; uses console.log to track when the effect runs; mentions cleaning up effects if necessary.
What happens if you omit the dependency array entirely?
Logs the responses to understand inconsistencies; creates a temporary error boundary to catch and log errors; checks API documentation for changes; considers implementing fallback values or defaults; discusses potential solutions with the team.
The API is critical and often changes. How would you set up a more robust solution to handle these fluctuations in the future?
Runs performance profiling tools to monitor render times; identifies components that are re-rendering unnecessarily; checks for large bundle sizes or heavy assets; isolates the new feature to see if it introduces delays; consults browser dev tools for network performance.
You discover a large image is causing delays. What strategies do you employ to optimise asset loading and improve performance?
Names the specific version or library migrated to and the reasons for the migration; describes the challenges encountered during the process; explains how those challenges were identified and addressed; discusses the timeline of the migration and any trade-offs made; avoids placing blame on external sources.
What would you have monitored more closely during the migration?
Checks for unnecessary re-renders by using React DevTools; examines component's props and state for changes; looks for memoisation opportunities with React.memo or useMemo; considers the impact of heavy computations in render.
What can you do to prevent re-rendering of child components?
Ensures that state is updated correctly with onChange handlers; checks if the initial state is being set correctly on component mount; considers using useEffect to sync state with props if needed; mentions controlled vs uncontrolled components.
What are the implications of using uncontrolled components in this scenario?
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.