All jobs / Frontend / web developer / React

Frontend / web developer interview question · 3–5 years

A like button uses optimistic UI. The request fails. What must happen?

The strongest answer

Roll back local state and the cache, show the error, and leave the action retryable

Why it works

Optimistic UI is a loan: failure must repay it. Users should see the truth and be able to try again.

What a good answer covers

Answers that fall short

Who gets asked this

More React questions