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

时间:2021-05-19 06:49:08

I'm reading the intro to redux pattern, and there is the following paragraph there:

我正在阅读redux模式的介绍,那里有以下段落:

... consider the new requirements becoming common in front-end product development, such as handling optimistic updates, rendering on the server, fetching data before performing route transitions, and so on.

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

My question is what is optimistic updates here?

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

1 个解决方案

#1


26  

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.

在乐观的更新中,UI的行为就好像在从服务器接收确认之前成功完成了更改 - 它乐观地认为它最终会得到确认而不是错误。这允许更灵敏的用户体验。

#1


26  

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.

在乐观的更新中,UI的行为就好像在从服务器接收确认之前成功完成了更改 - 它乐观地认为它最终会得到确认而不是错误。这允许更灵敏的用户体验。

相关文章