Apollo 客户端状态管理

发布于 2025-01-16 13:29:17 字数 232 浏览 2 评论 0原文

我遇到一种情况,我需要保存多个 UI 页面上的用户输入,然后将累积的数据发送到某些第 3 方后端服务。

我想了解 Apollo Client 是否能够将每个页面上的用户输入存储在其缓存中,然后在需要时将其转储到后端服务器?这是正确的做事方式吗?

在这种情况下,我的技术堆栈有什么要求?

目前我有以下设置:react frontend -> graphql ->; Java后端

谢谢

I have a situation where I need to save user input on multiple UI pages and then send accumulated data to some 3rd party backend service.

I wanted to understand if Apollo Client is capable of storing user input on each page in its cache and then dumping it to the backend server when needed? Is it the right way of doing things?

What are the requirements for my tech stack in this case?

Currently I have the following setup: react frontend -> graphql -> Java backend

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故笙诉离歌 2025-01-23 13:29:17

也许,您可以使用 localStorage 将数据保存在本地状态,或者您需要保存吗

Maybe, you can use localStorage for save data in local state, or Do you need save

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文