Refact web react's http request code, using custom hooks,
Closed this issue · 2 comments
lgh06 commented
- https://dev.to/shaedrizwan/building-custom-hooks-in-react-to-fetch-data-4ig6
- https://reactjs.org/docs/hooks-custom.html
- https://jotai.org/docs/basics/async
- https://swr.vercel.app/
- https://github.com/tannerlinsley/react-query
compare:
https://redux-toolkit.js.org/rtk-query/comparison#comparing-feature-sets 可能不中立
https://react-query.tanstack.com/comparison
DO NOT USE RTK!!!
lgh06 commented
jotai + react-query + next.js ?
https://react-query.tanstack.com/guides/ssr
https://jotai.org/docs/integrations/query
lgh06 commented
used custom hooks using browser fetch, and a fetch wrapper used in event handlers. close.