mytakedotorg/mtdo

Optimistic UI Updates

开放

#183 创建于 2018年4月2日

 (0 条评论) (0 个反应) (0 位负责人)Java (3 个派生)auto 404
enhancementfrontendgood first issue

仓库指标

星标
 (16 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南