Why useFetch hook removal? #567
Unanswered
soullivaneuh
asked this question in
Help
Replies: 1 comment
-
In fact, I haven't considered the "light data fetching implementation" use case. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am currently looking at the v3 upgrade guide and saw the
useFetch
hook was considered as deprecated and removed (#503).You suggest on the guide to rely on dedicated library for that like SWR or react-query.
They are indeed good solutions for complex implementation of data querying like for binding a REST API to a frontend project.
However,
useFetch
can be still useful for light data fetching implementation, for example, when you just need to fetch some public data on the whole project without having to setup a complex library.The only current "drawback" of your
useFetch
implementation was the JSON response compatibility only (#266), but that may be an easy pick to remove.This hook is still an enhancement to me as it simplifies the integration of
fetch
inside a react component withuseEffect
and the request state management.I didn't see any explanation of the reason you decided to remove this hook so this is why I am here, to ask why.
I'm curious. 😉
Cheers and thanks for that library!
Beta Was this translation helpful? Give feedback.
All reactions