前端开发中的“乐观更新”是什么? [英] what is `optimistic updates` in front-end development
问题描述
我正在阅读介绍 redux
...考虑新要求变得常见在前端产品
开发中,例如处理乐观更新,在
服务器上渲染,在执行路由转换之前获取数据等。
我的问题是什么乐观更新在这里?
在乐观更新中,用户界面的行为就像在从服务器收到实际确认之前成功完成更改一样 - 它乐观地认为它最终会得到确认而不是错误。这可以提供更快速的用户体验。
I'm reading the intro to redux
pattern, and there is the following paragraph there:
... 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?
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.
这篇关于前端开发中的“乐观更新”是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!