Interview practice question
A list doesn't show a newly created item
Frontend Engineering · State Management and Data Fetching · Intermediate
After creating a new task, users return to the task list but the new task doesn't appear until they refresh. How do you fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Cache not updated after mutation.
- Invalidate list queries on success.
- Or insert into cache directly.
- Ensure query keys match.
- Optimistic insert option.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.