mytakedotorg/mtdo

Optimistic UI Updates

Open

#183 opened on Apr 2, 2018

 (0 comments) (0 reactions) (0 assignees)Java (3 forks)auto 404
enhancementfrontendgood first issue

Repository metrics

Stars
 (16 stars)
PR merge metrics
 (PR metrics pending)

Description

There are places where we can reasonably predict the server response in our app, like when we are logged in and we star a take or follow/unfollow a user. The client side UI state can be updated before the server responds in these cases, and then reverted in the case of a failure response from the server. This will give our app a much snappier feel at a low cost.

(thanks to https://egghead.io/lessons/react-course-overview-optimistic-ui-updates-in-react)

See ReactionContainer.tsx for these scenarios.

Contributor guide