Menu
Sign In Search Podcasts Charts People & Topics Add Podcast API Pricing
Podcast Image

AsyncTalk

EP23 让拉数据,像呼吸一样自然

26 Feb 2023

Description

本期节目主要介绍了请求数据时常遇到的问题以及React框架下的几种解决方案。最后,我们将介绍本期的主角React Query,包括它的设计和功能。如果有任何意见和建议可以发邮件至 [email protected]如果愿意加入我们的 discord 社区可以点击这里: https://discord.gg/TQczjSJMah主播AnnatarHe: https://annatarhe.comTimeline00:00 开场,确实鸽了段时间00:35 在 discord 上开了个社区,想来聊天可以加01:20 请求数据,不像说的那么简单02:15 loading 说起来容易,做起来麻烦03:20 in/revalidation 也挺麻烦的05:25 cancel 也不好处理07:10 有 devtool 的话,会比想象中更方便07:30 把前后端交互做好,下班时间(也许会)显著提前08:10 ahooks 陪跑08:50 apollo client 仅限于 GraphQL09:30 SWR10:30 SWR 翻页数据有想法12:11 React Query13:23 Mutation 的支持14:10 对 TypeScript 的支持较好14:40 不要 debounce 了,直接取消请求吧16:29 甚至支持直接生成 GraphQL16:45 devtool 要比预想中的好用很多17:07 ReactQuery 的 cache 要是能更强一点儿就更好了18:20 使用 ReactQuery 记得至少分两层架构19:00 实现不难,难的是怎么想出来的20:12 有想法就去实现,下一个万 star 项目属于你相关链接AsyncTalk 的 discord 社群: https://discord.gg/8XXfh6jhDocument: visibilitychange event**:** https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilitychange_eventAbortController: https://developer.mozilla.org/en-US/docs/Web/API/AbortControllerReact.Suspense: https://beta.reactjs.org/reference/react/Suspenseahooks.useRequest: https://ahooks.js.org/hooks/use-request/indexapollo client: https://github.com/apollographql/apollo-clientSWR: https://swr.vercel.app/zh-CNReactQuery 对 TypeScript 的支持: https://tanstack.com/query/v4/docs/react/typescriptReactQuery 对于 GraphQL 的集成与支持: https://tanstack.com/query/v4/docs/react/graphql� 勘误SWR 2.0 支持了 Mutation: https://swr.vercel.app/zh-CN/blog/swr-v2#useswrmutationBGM by Otologic

Audio
Featured in this Episode

No persons identified in this episode.

Transcription

This episode hasn't been transcribed yet

Help us prioritize this episode for transcription by upvoting it.

0 upvotes
🗳️ Sign in to Upvote

Popular episodes get transcribed faster

Comments

There are no comments yet.

Please log in to write the first comment.