reactjs - 如何监控流程完成并将状态推送到 UI?
问题描述
假设我已将 10k 条记录从 DB 读入我的 ArrayList。我想转换记录并将完成进度状态推送到 React UI;说间隔 10%。
如何将通知从后端代码(在我的情况下为 Spring Boot)推送到前端?
谢谢!
解决方案
In order to send information to the frontend you could use WebSockets. Take a look at this guide on how to do it with SpringBoot: https://spring.io/guides/gs/messaging-stomp-websocket/.
推荐阅读
- python - 如何在 2d 列表 python 中找到具有相同变量的值的总和,仅使用列表理解?
- haskell - 在模式匹配的不同情况下推导出不同的类型类约束
- javascript - 如何处理由崩溃导致的 404 页面返回。反应路由器
- swift - 停止在 UITableView 的嵌套 UICollectionView 中播放视频或仅在嵌套结构中的可见单元格上播放
- svelte - Svelte (rollup) - 错误:意外的令牌(请注意,您需要 @rollup/plugin-json 来导入 JSON 文件)
- datetime - 如果 yaxis 包含空 dateTime 数据并且 useUTC 为 false,则图表未呈现并引发脚本错误
- r - 在运行时为克隆的元素创建 R 闪亮绑定?
- html - Shopify - 具有单独样式的重复块
- java - Java 消费者接口传递值
- c# - EntityFrameworkCore 跟踪 NoTrackingBehavior 上的更改