什么是前端开发的“乐观更新”

我正在读 redux模式介绍,这里有一段话:

考虑到新的需求在前端产品中变得普遍 开发,例如处理乐观更新、在 服务器、在执行路由转换之前获取数据等等。

我的问题是 乐观的更新在这里是什么?

18724 次浏览

In an optimistic update the UI behaves as though a change was successfully completed before receiving confirmation from the server that it actually was - it is being optimistic that it will eventually get the confirmation rather than an error. This allows for a more responsive user experience.