All jobs / Frontend / web developer / React

Frontend / web developer interview question · 3–5 years

Optimistic create plus a refetch returns the old list without the item. What do you guard?

The strongest answer

Reconcile with the server using stable ids — don't assume refetch order — and keep the mutation response as the source when it arrives

Why it works

Caches lie when writes and reads race. Ids and mutation payloads are how you merge.

What a good answer covers

Answers that fall short

Who gets asked this

More React questions