useRequet 如何预填充缓存, 或者说 如何支持 preload prefetch #2588
Unanswered
vaynevayne
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
react-router-dom v6 支持loader, 我在想loader里获取数据,然后传递给useRequest作为初始数据, 发现有初始数据就不发起请求了
如果要支持该功能, 你们内部应该也会抽离一个preload的函数,来做标记, 1.用于发起请求,2.写入缓存 可以依靠是否调用过preload, 来判断是否有预数据
Beta Was this translation helpful? Give feedback.
All reactions