All jobs / Frontend / web developer
Frontend / web developer interview question · 5+ years
Different screens show different values for the same entity. What is the root cause and the design fix?
The strongest answer
Multiple copies of server state in different caches and local states; one normalised server-state cache keyed by entity id, with mutations invalidating or updating it, so every screen reads one truth
Why it works
Right. One cache, one identity per entity.
What a good answer covers
- One server-state cache.
- Normalise by id.
- Mutations update the cache.
- Screens read, never copy.
Answers that fall short
- Close, but not the strongest: Slow network
Speed does not create disagreement. - Weak: Users opening two tabs
Tabs are a separate sync question. - Red flag: Missing CSS transitions
Not visual.
Who gets asked this
More Frontend / web developer questions
- Performance regresses every quarter despite fixes. How do you make it stick?
- A trader UI keeps the whole order book in a WebSocket reducer. A blip shows an empty book. What is the socket…
- A setInterval inside useEffect always logs the initial count. Why?
- A member must not see 'Transfer ownership'. An admin must. What do you implement?
- When is useMemo worth it?
- Why wrap a handler in useCallback?
- The team argues whether a field is `userId` or `user_id`. What is OpenAPI for here?
- When does React.memo help, and when does it not?